[gdal-dev] Unable to obtain EPSG from OGRSpatialReference
jujumbura at hotmail.com
Tue Jun 6 17:35:21 PDT 2017
I have a situation in which I would like to load up a set of polygons, and
determine what EPSG code they are using. I am testing with a simple square
polygon in upstate New York using the UTM projection, saved into a Shapefile
I am able to create my dataset, layer, and read the geometry just fine. I
can get access to the spatial reference, but if I call the
OGRSpatialReference::GetEPSGGeogCS() function, it always returns code 4326 (
which is lat/lon ). This is not correct, but if I query other values, they
seem to be valid. For instance, OGRSpatialReference::GetUTMZone() will
return 17 N, which is correct.
Does anybody know why I might be getting the wrong EPSG code? I had thought
I might just have bad data, but the fact that I can get the values
individually makes me think it is something about how I am using the
functions. Thank you for any advice.
View this message in context: http://osgeo-org.1560.x6.nabble.com/Unable-to-obtain-EPSG-from-OGRSpatialReference-tp5323281.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
More information about the gdal-dev