[postgis-devel] SRS Magic

Stefan Keller sfkeller at gmail.com
Sun Jan 24 13:49:33 PST 2016


Cool AutoIdentifyEPSG() method!

Sorry for creeping in for a related issue: But what is the correct
value for an undefined SRID: Is it 0 or -1 or both?

PostGIS changed from -1 to 0... I thought so far [1].
Until I found this [2] and this [3] which mention or refer to SRID value -1.

Then I looked at GeoPackage spec. [4] which uses both!
"The record with an srs_id of -1 SHALL be used for undefined Cartesian
coordinate reference systems. The record with an srs_id of 0 SHALL be
used for undefined geographic coordinate reference systems.".

What is the state in PostGIS?
Which is "more compliant" to ISO SQL/MM: PostGIS or GeoPackage spec.?

:Stefan


[1] PostGIS Ticket #286 "Change "no SRID" SRID to 0":
https://trac.osgeo.org/postgis/ticket/286
[2] PostGIS FAQ: http://postgis.org/documentation/manual-2.1SVN/PostGIS_FAQ.html
[3] PostGIS Docs: http://postgis.net/docs/using_postgis_dbmanagement.html
[4] GeoPackage Spec.: http://www.geopackage.org/spec/#spatial_ref_sys


2015-10-29 18:22 GMT+01:00 Even Rouault <even.rouault at spatialys.com>:
> Le jeudi 29 octobre 2015 17:23:14, Paul Ramsey a écrit :
>> One of the constant requests to make postgis easier to use is SRID
>> detection. At this point GDAL has almost all the bits and pieces to do
>> SRID detection from PRJ inputs.
>
> Paul,
>
> if by PRJ, you mean ESRI Shapefile .prj files whose WKT definition strips off the
> EPSG code even when the WKT is derived from an EPSG definition, then indeed
> there's some magic to add in GDAL to guess the EPSG code. There's a
> AutoIdentifyEPSG() method (
> http://www.gdal.org/classOGRSpatialReference.html#acb0373c83927bfd694048da6f79e33ea
> ) but it is fairly limited.
>
> Even
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/postgis-devel



More information about the postgis-devel mailing list