Opened 14 years ago
Closed 13 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: |
Description
Strk,
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 , 14 years ago
comment:2 by , 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 , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I see this done. That is, AddGeometryColumn warns and converts unknowns to 0.
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.