[GIS] Conversion between lat/lon and local coordinate system

convertgeometrygeometry-conversionlatitude longitudexy

This is an example situation

I have local coordinate system, this is the red grid on the image. Red grid XY points measured in meters, and I know:

  • The 0;0 point of the red grid and the lat/lon coordinates of this one point. (the geo system is the green lines on the image measured in lat/lon). This is the one and only point I know values on booth coordinate system (the blue point on the image).

  • The angle of local coordinate system relative to latitude in degree.

Is it possible the convert values between these two coordinate system with a math formula? If I know the lat/lon values of the point on the green grid, can I get the XY values on the reg grid, and if I know the XY values of any point (and the angle of reg grid in deg) on the red grid in meters, can I got the lat/lon values on the geo coordinate system?

How can I get the transformation formula – if it even possible?

————– EDITED —————

Thinking how to solve this problem.

  • Convert lat/lon values of the common point (X Y) and the another (unknown) point from lat/lon to X1 Y1 values. This is the method to get same unit (meters) for different coordinate systems.

  • Count the difference between X1 – X and Y1 – Y to get vertical and horizontal distances between common point and the original lat/lon values.

  • Finally I can use formula from this page: https://en.wikipedia.org/wiki/Rotation_matrix but the angle is 90 – (my rotation angle from latitude) in degrees.

Is it right way?

Best Answer

Going from a lon-lat coordinates (spheroid) to cartesian coordinates is not as easy as just using a mathematical formula, the formulas for the reprojection are quite big and the solution is not explicit sometime.

Depending on the accuracy required there are standarized procedures to undertake the task. A common one is project a lon-lat data into a Transvers Mercator projecton. The central meridian and the scale factor can be choosen at will in order to match the accuracy required. Here some reading about the subject by Richard Stanaway Link.

Once that is said, your problem could be seen as two problems:

  1. To reproject your lon-lat coordinates to a standard cartesian projection like UTM or a local TM.
  2. Once you know the coordinates in the standard cartesian system, you can apply the required translation and rotation.

For the first task I recommend you a sound GIS tool like the user friendly QGIS or the proj.4 if you want to code.

Many questions are still to come:

  1. Which is the World Geodetic System of your lon-lat coordinates?
  2. Which is the suitable standard cartesian projection for your needs? Maybe a UTM is enough.
  3. If the standard cartesian projection is parallel to the paralles, like a Transverse Mercator, the rotation is trivial, but if it is not, then you have a new challenge.