Hi all,
I know that the issue of adding support for projections in shapely has
came up before, I just wanted to know if you could give some pointer
on this.
I've been using shapely to obtain the WKB representation of a (large)
collection of points, which I later use in a PostGIS import script:

>>> p = Point(-86.66666666666667,33.0)
>>> p.wkb.encode("hex").upper()
'0101000000ABAAAAAAAAAA55C00000000000804040'

My problem is that this representation does not include the bytes
related with the projection of the geometry (WGS84 lat/lon, EPSG
4326), so when importing the records to PostGIS the
"enforce_srid_the_geom" constraint fails. PostGIS expects a WKB like
this one:
"0101000020E6100000ABAAAAAAAAAA55C00000000000804040"

Is there a more elegant way to have these missing bytes in the
geometry representation, other than push them manually on the hex
string? I wouldn't mind using some other library.

Thanks,



-- 


Adrià Mercader
-----------------------------
http://amercader.net
_______________________________________________
Community mailing list
[email protected]
http://lists.gispython.org/mailman/listinfo/community

Reply via email to