0

I have a dataset of some points in python which have longitude and latitude for each of them. Because they are located in different UTM zones, when I want to convert them to UTM, I will get some negative Easting points. Is there any function in python/QGIS or everywhere that will be smart enough to solve this problem?

2
  • 2
    This is an expected result to get negative value if the point is in east of the target UTM zone. What is wrong here? Mar 17, 2023 at 12:27
  • Since UTM zones are strictly bounded by declared longitude values, surely you can create a filter to only process those that are in a specified UTM zone. As @KadirŞahbaz says, the negative values are correctly converted, they are just not in that UTM zone. Mar 19, 2023 at 0:55

1 Answer 1

1

Yes! use the UTM Python Library. From the command line install utm

pip install utm

Then try something like:

import utm
utm.from_latlon(48, -122)
(574595.1124862543, 5316784.0095401555, 10, 'U')
utm.from_latlon(-48, -122)
(574595.1124862543, 4683215.9904598445, 10, 'G')

Where 'U' = is a particular latitude band within UTM zone North and 'G' = is a latitude band within UTM zone South

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.