Consider the code that I have written in the stackoverflow question How to extract vertexes of geometries in ESRI shapefiles using ogr library with c++, I have used the code to show shapefiles on an OpenGL window and my problem is it seems the layer is stretched comparing to what is shown when we render it in ArcGIS, QGIS and etc that I think it is maybe because of not using the correct projection.
for a layer, like this:
are the vertex coordinates stored in Geographic coordinate system or projected coordinate system when we use functions like:
OGRLineString::getPoint(int,OGRPoint*);
OGRPoint::getX();
OGRPoint::getY();
when I debug my code and see the vectors stored:
I come to the point that coordinates are stored in the PCS not GCS, but why my layer is stretched.
In fact I'm not sure what's the problem to start to solve. So just tell me:
- Are the coordinates fetched when we use the above functions in geographic coordinate system or in projected coordinate system?
Edited section based on the Andre Joost's comment
I have downloaded Country Regions
dataset here, you see its coordinate system and bounding box here:
and the data stored is:
that you see is in decimal degrees. Now in ArcCatalog I change the coordinate system:
As you see the bounding box is not projected to the new coordinate system and they are the same number just their unit is in meters. Which is obviously not true:
and the data stored with for the same point in my program is:
So I think the projection is not done automatically and I should do the calculations with PROJ.4 library!