[gdal-dev] gdalsrsinfo Incorrect or Inconsistent results reporting EPSG codes

David Cakalic davidc.photo at outlook.com
Thu Oct 31 18:01:03 PDT 2019


Hi,

I've been having a problem using gdal to simply read/report EPSG headers on rasters.  I am trying to use it to verify header projection information is correct.
First, I am using Windows 10.
Rasters are Imagine .IMG format.
Command being used is   gdalsrsinfo -e {filename}

I've tried gdal from various sources/vintages... the problem is I can only get it to report the proper (expected) EPSG on 2 of 6 computers... even if I take special care to follow same steps each time.  I am also using the SAME EXACT image file each time.

The projection is NAD83(2011) / UTM zone 14N.
So I expect to see EPSG:6343

I'm often getting EPSG:26914
This is NAD83 / UTM zone 14N   (NOT 2011)

Or I get EPSG:  -1

The gdal install that works as expected on 2 of 6 computers is the version that installs on Windows along with  OSgeo4w.  (GDAL 2.4.1 as reported by "gdalsrsinfo --version" command)

It only works if I run the gdalsrsinfo command from the C:\OSgeo4w\bin folder.... If I run from anywhere else I get the other results mentioned.
Also, I've installed the same OSgeo4w on all 6 machines... and it only works on two.

Other GDAL binaries for Windows I got from the gisinternals website... I've tried multiple versions (2.4.1, 2.4.2, 3.0....) and I'm running through the command shell provided with that distribution....  All getting different results (sometimes -1   sometimes  26914)   but I simply can't find any consistency of WHY it is working sometimes and not others.

One concern I have is that perhaps since GDAL is packaged with SO MANY programs (ESRI, Qgis, Global Mapper, etc.) that perhaps the command is calling incorrect libraries?

Please... if anyone has ideas on WHY this is happening, or how to force the command to run from a a CLEAN environment only using the libraries I desire, I welcome input.
Sincerely,
David C.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20191101/4d05890d/attachment.html>


More information about the gdal-dev mailing list