[gdal-dev] ogr2ogr PG->SHP lacks EPSG code

Even Rouault even.rouault at spatialys.com
Sat Nov 19 07:48:30 PST 2016


On samedi 19 novembre 2016 16:34:16 CET Martin Landa wrote:
> Hi,
> 
> 2016-11-13 13:29 GMT+01:00 Even Rouault <even.rouault at spatialys.com>:
> 
> thanks for detailed insight. BTW, ogr2ogr couldn't also generates .qpj
> when srs epgs code is given?

It could certainly do this, but the question is more: should it do it ? Adding 
another file in addition to the already many ones generated doesn't sound very 
appealing. And then on the reading side, you'd have the question of which of 
.qpj and .prj is prioritary (I guess .qpj would be prioritary)?

For something completely unrelated, I've a bit improved the reading of .prj 
file as GDAL SRS by calling AutoIdentifyEPSG() ( http://www.gdal.org/
classOGRSpatialReference.html#acb0373c83927bfd694048da6f79e33ea ), which can 
help retrieving the EPSG code for the most common SRS (very few ones, don't be 
too enthousiastic!)
Anyway while looking at that, I saw a mention in the code to https://
trac.osgeo.org/gdal/ticket/6485, which mentions .prj files with EPSG codes in 
them. I'm not sure what has generated those .prj files, but I'm wondering what 
would be the consequence of OGR keeping the EPSG code in a .prj file (while 
still "morphing" SRS names, datum names, projection names and projection 
parameters like we do). Would ESRI software (and others) choke on that ?

Even


-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list