I have been trying to convert the WGS84 style geo-positions to x,y coordinates on a 2D plane. I have looked into many different links, websites, studies and I honestly gave up on finding a plane copy and paste solution. Things that I have observed:

  • I select a point on the Openstreetmap let's say 48.8532, 2.3528.
  • I let that point to be presented as the origin on my 2D plane, (0,0) in x,y.
  • I already know the ranges of latitude and longitude values.
  • I define the range for the x,y values of the 2D plane. (ex. x=[0, 50000] y=[0,5000])
  • I interpolate the geo-positions using linear interpolation to the numbers on the 2D plane.

Now my questions:

  1. Is this correct? Is the WGS84 representation a linear coordinate system?
  2. If the answer to the previous question is no, then could you provide a code that does this correctly? (no plane formulas and no links to further studies please, just code in C, C++, C#, Java or Javascript. Note that I'm not asking for a distance, I'm asking for a point-to-point convertor code).
  • You ask a lot. I would recommend to read about geographic and projected coordinate systems for example from webhelp.esri.com/arcgisdesktop/9.2/…. Then select your favourite projected system and projection library like Proj4, geotools, deegree etc. – user30184 Aug 20 '14 at 11:08

WGS 84 is not a cartesian coordinate system. You can use it directly for your visualisation purposes, but you should be aware that distances, shapes and areas will be distorted.

If you want to project your WGS 84 coordinates to a 2D cartesian reference system, you'll need to choose a destination coordinate system : there is no single answer to your question.

For the sake of simplicity, I suggest that you use gdaltransform for your purpose. It is open source (under the X11/MIT license) so you can reuse the code if you want.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.