[gdal-dev] will ogr get coordinates in geographic coordinate system or projected coordinate system when using getPoint function

David Strip gdal at stripfamily.net
Sun Sep 15 09:35:09 PDT 2013


On 9/15/2013 3:39 AM, sepideh wrote:
> I come to the point that coordinates are stored in the *PCS* not *GCS*, but
> why my layer is stretched.  
>
> Is it because I show GCS coordinates in a glOrtho projection or do you think
> the problem is something else?
>

Your problem is that the coordinates are being graphed in a coordinate
system that fills the viewport that you have defined. You can see this
by grabbing the right edge of your openGL window and resizing. The
entire display rubber-bands with the shape of the screen.

I'm not that familiar with the structure of openGL programs, but your
problem lies in the interaction of the viewport with the projection
(glOrtho in this case).  You need to get these coordinated so that shape
is preserved. I would start with a very simple program- plotting a
square - and make sure that no matter how you resize the window, it
remains square. Once you get this understood, apply that logic to
setting the viewport and projection for your shapefile program.



More information about the gdal-dev mailing list