MTgeophysics / mtpy

Python toolbox for standard Magnetotelluric (MT) data analysis
GNU General Public License v3.0
147 stars 66 forks source link

incorrect latitude and longitude and utm covertion #7

Closed YingzhiGou closed 6 years ago

YingzhiGou commented 6 years ago

there are 3 pairs of functions in gis_tool.py that does the transform between latitude and longitude, and utm. however, after some test and compare the result with the online tools such as Convert Lat Long to UTM and Geodetic Calculations - Redfearn's Formulae, Geographic to Grid. all the functions produce incorrect results. the errors are listed below

YingzhiGou commented 6 years ago

created a branch issue/#7 for this issue

YingzhiGou commented 6 years ago

fixed project_point_ll2utm() utm zone letter in commit 81a8c71736c9213fd1de86bf06bee109cc03622f now the output is ('55H', 702562.7731274947, 6202448.525952505)

YingzhiGou commented 6 years ago

fixed project_point_utm2ll() in commit ddbfa419b456a6c869f91b46b6552a8411aeb902 now the output is (-34.299442, 149.201031)

YingzhiGou commented 6 years ago

fixed transform_utm_to_ll() in commit 06d91420f7d12d2b3da0a0340d7870491c1ce994 now the output is (-34.299442000105323, 149.20103099893976)

YingzhiGou commented 6 years ago

found another issue with when utm coordinates are on South of Equator and transforming back to lat and lon. it seems always do north. updating test cases for it.

YingzhiGou commented 6 years ago

some other function expects NATO UTM zone code and if epsg provided, utm zone returned by project_points_ll2utm() is overrwten by function get_utm_string_from_sr() which returns Standard UTM zone code