Skip to content

Instantly share code, notes, and snippets.

@lsaavedr
Forked from marcelino-m/tcoord_mlp.py
Created April 13, 2017 18:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lsaavedr/38c79573285c06c0ff77c4682055ab24 to your computer and use it in GitHub Desktop.
Save lsaavedr/38c79573285c06c0ff77c4682055ab24 to your computer and use it in GitHub Desktop.
Transformacion de coordenadas MLP
import math as m
def mlp2sirgas(x_in, y_in):
K = 0.9993861340849
W = 0.0025759302920
T_x = 299836.7973
T_y = 6399665.955
teta= W * m.pi / 180.0
x = K * ( x_in * m.cos(teta) + y_in * m.sin(teta) ) + T_x
y = K * ( -x_in * m.sin(teta) + y_in * m.cos(teta) ) + T_y
return (x, y)
def sirgas2mlp(x_in, x_in):
K = 1.0006142429036
W = -0.0025759302936
T_x = -299733.0738
T_y = -6403610.386
teta= W * m.pi / 180.0
x = K * ( x_in * m.cos(teta) + y_in * m.sin(teta) ) + T_x
y = K * ( -x_in * m.sin(teta) + y_in * m.cos(teta) ) + T_y
return (x, y)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment