Toblerity/Shapely — pull request #132 by mwtoews (2014-05-14 11:30:50+00:00)
Title: Support SRID on geometry, and with WKT/B Reader/Writers

A few notes:
* If SRID=0, it is not written to either WKT or WKB, regardless of 'include_srid' setting
* SRID ranges are not checked, as PostGIS does. E.g., the valid range is between 0 and I think 999998
* SRID support for the WKT Reader/Writer is 100% Python, since [it isn't in GEOS](http://trac.osgeo.org/geos/ticket/355)
* SRID support for the WKB Reader/Writer is 100% GEOS C API

Currently, I set 'include_srid'=True as default for both writers, which may not be popular. However, I don't expect any surprises since this would only be written with geometries that somehow have set the SRID attribute data, which before now was to load WKB where it is set.

Here's a short demo of the current capabilities:
```python
from shapely.wkt import loads as load_wkt
from shapely.wkb import loads as load_wkb
p1 = load_wkt('POINT(0 0)')
p2 = load_wkt('SRID=4326;POINT(0 0)')
print(p1.srid) # 0
print(p2.srid) # 4326
print(p1.wkb_hex) # 010100000000000000000000000000000000000000
print(p2.wkb_hex) # 0101000020E610000000000000000000000000000000000000
print(p1.wkt) # POINT (0 0)
print(p2.wkt) # SRID=4326;POINT (0 0)
# Change values
p1.srid = -10000000
p2.srid = 0
print(p1.wkt) # SRID=-10000000;POINT (0 0)
print(p2.wkt) # POINT (0 0)
print(load_wkb(p1.wkb).wkt) # SRID=-10000000;POINT (0 0)
print(load_wkb(p2.wkb).wkt) # POINT (0 0)
print(load_wkb(p1.wkb_hex, hex=True).wkt) # SRID=-10000000;POINT (0 0)
print(load_wkb(p2.wkb_hex, hex=True).wkt) # POINT (0 0)
```