MTgeophysics / mtpy

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

Update gis_tools.py #155

Closed geochenhuang closed 2 years ago

geochenhuang commented 2 years ago

Fixed the bug: wrongly judge site with latitude in 0-8 degree is in south

Description

I have changed the original code "is_northern = True if utm_zone[-1].lower() > 'n' else False" in function split_utm_zone in file gis_tools.py to "is_northern = True if utm_zone[-1].lower() > 'm' else False", where 'n' was changed to 'm'.

Motivation and Context

If unchanged, the split_utm_zone function will judge the points with latitude in 0-8 degree are in the south. That's an obvous error and that error will result in wrong UTM grid coordinates.

How Has This Been Tested?

The following shows my testing: In: gis_tools.split_utm_zone('6N') Out: (6, True) Apparently, the result is correct.

Screenshots (if appropriate):

image

Types of changes

Checklist: