[gdal-dev] [Non-DoD Source] Re: ogr not reading the prj file
TUELLER, SHAYNE R CIV USAF AFMC 519 SMXS/MXDEC
shayne.tueller at us.af.mil
Tue Jan 22 10:20:46 PST 2019
Thanks for the reply. However, this didn't address my question regarding why I don't need GDAL_DATA defined in gdal 1.11 in order for SRS info to print out...
Shayne
-----Original Message-----
From: gdal-dev <gdal-dev-bounces at lists.osgeo.org> On Behalf Of jratike80
Sent: Tuesday, January 22, 2019 10:59 AM
To: gdal-dev at lists.osgeo.org
Subject: Re: [gdal-dev] [Non-DoD Source] Re: ogr not reading the prj file
TUELLER, SHAYNE R CIV USAF AFMC 519 SMXS/MXDEC wrote
> I should also mention that when using gdal 1.11, I didn't have to
> explicitly set the GDAL_DATA environment variable in order for the SRS
> info to print out. With gdal 2.3.1, if I don't set the GDAL_DATA
> variable, I get the following error...
>
> ERROR 4: Unable to open EPSG support file gcs.csv. Try setting the
> GDAL_DATA environment variable to point to the directory containing
> EPSG csv files.
>
> Not sure why I don't need this dependency in gdal 1.11. With this
> version it just loads the SRS info found in my prj file which is what I want.
>
> Shayne
Hi,
Please read the previous answers and try to understand what happens.
- ESRI is using its own version of WKT that is slightly different from the OGC version. With your .prj the main difference is in the name of the DATUM:
"D_WGS_1984".
- GDAL reads the ESRI variant and if it finds corresponding OGC WKT it prints that by default.
- The older GDAL version probably did not find the hit. You should experiense the same with GDAL 2.3.1 if you edit your .prj file a bit so that it will not find corresponding definitions from the EPSG data in GDAL_DATA directory
You did not explain yet what real problem you have due to gdalinfo reporting OGC WKT instead of ESRI WKT. Both mean just the same for GDAL.
If you want to see the ESRI WKT you can use gdalsrsinfo. I saved your .prj as test.prj and here is the result. Even "SPHERIOD" is remained.
-Jukka Rahkonen-
--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
_______________________________________________
gdal-dev mailing list
gdal-dev at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev
More information about the gdal-dev
mailing list