<div dir="auto"><div>Andre,<div dir="auto">My reading of his description is that he's using projected coords (i.e. metres) so for UTM 17N isn't that this - <a href="https://epsg.io/32617">https://epsg.io/32617</a>? </div><div dir="auto">EPSG4326 is WGS84, geographic (lat/lon) which defines the spheroid used in UTM.</div><div dir="auto"><br></div><div dir="auto">I'm not a C++ programmer nor have I read the docs for the GDAL API - perhaps it's not the correct function? </div><div dir="auto"><br><div data-smartmail="gmail_signature" dir="auto">Ian Lilly<br>+60 1 7608 5310</div></div><br><div class="gmail_extra"><br><div class="gmail_quote">On 7 Jun 2017 13:46, "Andre Joost" <<a href="mailto:andre%2Bjoost@nurfuerspam.de">andre+joost@nurfuerspam.de</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="quoted-text">Am 07.06.2017 um 02:35 schrieb Mike K:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
I have a situation in which I would like to load up a set of polygons, and<br>
determine what EPSG code they are using.  I am testing with a simple square<br>
polygon in upstate New York using the UTM projection, saved into a Shapefile<br>
.<br>
<br>
I am able to create my dataset, layer, and read the geometry just fine.  I<br>
can get access to the spatial reference, but if I call the<br>
OGRSpatialReference::GetEPSGGe<wbr>ogCS() function, it always returns code 4326 (<br>
which is lat/lon ).  This is not correct, but if I query other values, they<br>
seem to be valid.  For instance, OGRSpatialReference::GetUTMZon<wbr>e() will<br>
return 17 N, which is correct.<br>
<br>
Does anybody know why I might be getting the wrong EPSG code?  I had thought<br>
I might just have bad data, but the fact that I can get the values<br>
individually makes me think it is something about how I am using the<br>
functions.  Thank you for any advice.<br>
<br>
</blockquote>
<br></div>
What EPSG code do you think is "right" ?<br>
<br>
Many projected coordinate systems are based on a geographical coordinate system more or less identical to WGS84 (EPSG:4326).<br>
<br>
HTH,<br>
André Joost<div class="elided-text"><br>
<br>
<br>
______________________________<wbr>_________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailma<wbr>n/listinfo/gdal-dev</a></div></blockquote></div><br></div></div></div>