Turbo87 / utm

Bidirectional UTM-WGS84 converter for python
http://pypi.python.org/pypi/utm
MIT License
486 stars 101 forks source link

Feature request: add option to force to a UTM zone when converting from wgs84 to UTM #77

Closed chuckerone closed 2 years ago

chuckerone commented 2 years ago

Hi, Not sure if this is possible yet, so please correct if I'm missing something. Would it be possible to add an option to force the conversion/reprojection to a defined UTM zone when reprojection from wgs to UTM?

A use case for example converting points (in wgs84) to fit a Sentinel 2 tile (in UTM). If a Sentinel 2 tile falls on a boundary between two UTM zones half the points will be converted to the corresponding Sentinel 2 tile UTM zone and the other points converted to a different UTM zone.

By forcing the reprojection to a specified UTM zone would solve the above so that all the point fall within the same UTM zone. Something like utm.from_latlon(51.2, 7.5, utm="32u") or something along those lines.

Turbo87 commented 2 years ago

see https://github.com/Turbo87/utm/issues/7 😉