geoalchemy / geoalchemy2

Geospatial extension to SQLAlchemy
http://geoalchemy-2.readthedocs.org
MIT License
637 stars 112 forks source link

SRID is not preserved qhen fetching data from database #9

Closed rapto closed 11 years ago

rapto commented 11 years ago

If a table is created with a srid-aware geometry, the inserted rows' geometry is lost when fetching.

I include a reference to a patch that solves this issue: https://github.com/meteogrid/geoalchemy2/commit/9f50ffa43ab46c404c00353f964e584cb6a66640

I wonder whether it would be possible to use EWKB and EWKT all over the library to make all geometries srid aware, since most GIS development ends up being srid aware (remember unicode, time zones, etc.).

elemoine commented 11 years ago

Patch looks good! I'll look at into more detail, and will apply it. Thanks.

elemoine commented 11 years ago

I'd just like to modify @rapto's patch not to add another the Lake_4326 and CallFunctionTestWithSRID classes. Instead I want to change the existing Lake and CallFunctionTest classes. A PR that does that would much appreciated :)

elemoine commented 11 years ago

Finally found some time to do it myself. See 4736d8d885ba6174c4a4f8cc7bac5b6705a1eb89. Thanks @rapto and @pgiraud.