Opened 2 years ago
Closed 22 months ago
#5262 closed enhancement (wontfix)
Add support of Undefined Cartesian SRS (-1)
Reported by: | lbartoletti | Owned by: | pramsey |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 3.4.0 |
Component: | postgis | Version: | 3.3.x |
Keywords: | Cc: | lbartoletti |
Description (last modified by )
Postgis uses 0 as undefined SRS. But you can have an undefined geographic srs (0) and an undefined cartesian srs (-1). This is what is proposed in the GeoPackage table[1][2] (and I think it comes from an OGC standard I forgot).
If, with ogr2ogr, I convert my "local" cartesian table to postgis, it will be an undefined srs (0, since there is a constraint CHECK (srid > 0 AND srid ⇐ 998999) and SRID_UNKOWN is 0[3]).
Can cause trouble if you have two undefined tables, one geographic and the other one cartesian.
[1] https://gdal.org/drivers/vector/gpkg.html#coordinate-reference-systems
[2] http://www.geopackage.org/guidance/getting-started.html#gpkg_spatial_ref_sys
[3] https://github.com/postgis/postgis/blob/3e38e0b83b98925122bb22dff958a7a603ee4a42/liblwgeom/liblwgeom.h.in#L210
Change History (5)
comment:1 by , 2 years ago
Description: | modified (diff) |
---|
comment:2 by , 2 years ago
Milestone: | PostGIS 3.3.2 → PostGIS 3.4.0 |
---|
comment:3 by , 2 years ago
It's not possible to literally store -1 in the SRID slot, as we moved to positive-only in order to maximize our use of the limited number of bits available in our 24-bit SRID slot in the serialization. Having a sign bit and then using only one negative SRID would mean throwing away half our SRID storage space. Not sure why using 0 is not practicable for 99% of use cases.
comment:4 by , 2 years ago
I haven't heard anyone complaining about it and srid is just a number. Is there a new special use case growing popular that we are not aware about that needs this distinction?
I mean either way the spatial ref is not going to be in our spatial_ref_sys so it's up to the user to make sense of it anyway.
comment:5 by , 22 months ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
I'm moving this to 3.4 as I don't think it's something we should be changing in a stable