[postgis-devel] Rant on SRID -1 vs 0

Stephen Woodbridge woodbri at swoodbridge.com
Mon Jul 15 14:10:51 PDT 2013


I need to vent some frustration with the the change from srid=-1 to 
srid=0 for the undefined projection because this totally breaks scripts 
and makes it very hard to test things like pgrouting that need to work 
on both 1.5, 2.0 and 2.1.

For example:

select addgeometrycolumn('unnoded', 'the_geom', 0, 'LINESTRING', 2);

does not work on  POSTGIS="1.5.3" GEOS="3.3.8-CAPI-1.7.8" PROJ="Rel. 
4.8.0, 6 March 2012" LIBXML="2.7.8" USE_STATS

And this is just the first of the problems I'm trying to track down.

The second is the change in behavior of st_startpoint() with multi 
geometries and the change of st_geometryn() with simple geometry. This 
forces every function that uses these to check the postgis version 
conditionally implement access.


Grummble, gummble, gummble, off to find some kind of solution(s).

-Steve



More information about the postgis-devel mailing list