[postgis-devel] Unknown SRID value: 0 or -1 ?

Paragon Corporation lr at pcorp.us
Fri Dec 9 13:15:40 PST 2011


> I've started work on testing dump/restore procedure for getting to 2.0
> and realized the data w/out a proper SRID won't come back due to
> ensure_srid_geom checks on tables insisting of the SRID being -1
> rather than 0.

> There's no much we can do to fix this, unless we're willing to
> drop the constraints from the user dump.

> For this reason I think it would be safer to get our unknown
> srid back to -1 before it's too late (srid=0 getting in dumps
> and making things even harder).


My proposition -- change to srid = 0 as our official.
For existing we create a prepare_for_postgis20.sql

That people run on their existing database that does this:

1) Fixes existing constraints -- not its not just -1 srid.  There is the
ndims one needs to be changed to st_ndims.

2) Some old ones use srid function.

3) For unknown srid checks -- the script will just remove them.

4) For people using the French SRID that is larger than our max srid, we
have the script
change the srid to something that fits in our current srid limit.

Jus thave to decide what SRID to move 

Thanks,
Regina





More information about the postgis-devel mailing list