Opened 13 years ago

Closed 12 years ago

#738 closed defect (fixed)

AddGeometryColumn allow to accept srid = 0 and other unkonwn srid issues

Reported by: robe Owned by: pramsey
Priority: medium Milestone: PostGIS 2.0.0
Component: postgis Version: master
Keywords: Cc:



To answer your question about why we want to get rid of srid=-1. Everyone else uses 0 (Oracle/SQL Server (I know for sure)) and the MM specs as I recall say unknown should be 0.

But we probably need to put in some tests before we can safely do this. For one if you can some how inherit Paul's SRID_UNKNOWN variable. Not sure if that is possible. That would be ideal I think.

Change History (3)

comment:1 by strk, 13 years ago

Topology is pure scripting atm, so SRID_UNKNOWN is only possible if we get that as a preprocessor define in one of the include files.

comment:2 by strk, 13 years ago

We should have AddGeometryColumn threat SRID ⇐ 0 in the same way, eventually warning if the actual value doesn't match the unknown srid.

The unknown srid, at SQL level can be obtained with ST_Srid('POINT EMPTY').

Next step for this ticket would be adding a regress test for AddGeometryColumn (currently missing).

comment:3 by strk, 12 years ago

Resolution: fixed
Status: newclosed

I see this done. That is, AddGeometryColumn warns and converts unknowns to 0.

Note: See TracTickets for help on using tickets.