<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div id="Signature"><br>
<div>
<div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Hi,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
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.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
First, I am using Windows 10.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Rasters are Imagine .IMG format.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Command being used is   gdalsrsinfo -e {filename}</div>
<br>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
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.<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">The projection is NAD83(2011) / UTM zone 14N.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">So I expect to see EPSG:6343</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt"><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">I'm often getting EPSG:26914</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">This is NAD83 / UTM zone 14N   (NOT 2011)</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt"><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">Or I get EPSG:  -1</div>
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
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)</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
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.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Also, I've installed the same OSgeo4w on all 6 machines... and it only works on two.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
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.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
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?<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
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.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Sincerely,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
David C.<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div id="Signature"><br>
</div>
</div>
</div>
</div>
</body>
</html>