Link below is to a sample IMG file on WeTransfer: https://we.tl/t-KtV9xCLaDF
Depending on the computer, this is showing as: EPSG: -1 EPSG: 26914 EPSG: 6343 when using gdalsrsinfo -e {image} or gdalsrsinfo -o epsg {image} Thank you, David C. jratike80 wrote: Subject: Re: [gdal-dev] gdalsrsinfo Incorrect or Inconsistent results reporting EPSG codes Hi, Please make is easier for us to help you and provide a link to such raster file. It does not need to be your real, perhaps confidential data, a small extract is actually much better. Just take care that if shows all the issues that you wrote about. Meanwhile you can read https://trac.osgeo.org/gdal/wiki/rfc73_proj6_wkt2_srsbarn and think if this change could explain some of your observations. -Jukka Rahkonen- David C. wrote > 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. > > > > _______________________________________________ > gdal-dev mailing list > gdal-dev@.osgeo > https://lists.osgeo.org/mailman/listinfo/gdal-dev -- Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev