Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: return the EPSG code corresponding to the UTM zone #51

Open
araichev opened this issue May 7, 2020 · 4 comments
Open

Comments

@araichev
Copy link

araichev commented May 7, 2020

I'd use that feature.

@rabbl
Copy link

rabbl commented May 7, 2020

I'd love that feature too.

@araichev
Copy link
Author

araichev commented May 7, 2020

Aha, it's easier than i initially thought:

def utm_epsg_from_latlot(lat, lon):
    zone = utm.from_latlon(lat, lon)[2]
    return f"326{zone:02d}"

@rabbl
Copy link

rabbl commented May 8, 2020

you should make a difference between northern and southern hemisphere:

32633 for zone 33 northern hemisphere
32733 for zone 33 southern hemisphere

So the method could be something like this:

def utm_epsg_from_latlot(lat, lon):
    zone = utm.from_latlon(lat, lon)[2]
    return f"326{zone:02d}" if lat >= 0 else f"327{zone:02d}"

@rico-ci
Copy link

rico-ci commented Jun 19, 2020

Yeah, this is discussed on several platforms (e.g. here). It would be great to have this as part of the package, so +1 on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants