I have converted my lat. and long. to UTM using the UTM package using the following function:
utm.from_latlon(lat, lon)
For example, for the following coordinates in Massachusetts:
a = (42.643614, -71.80304)
I get this:
(270205.1516852962, 4725049.463904671, 19, 'T')
and for
b = (42.604968, -72.096649)
I get this:
(738166.3786696462, 4721035.379887606, 18, 'T')
As you see the zone is different, a is in zone 19, but b is in zone 18. Imagine you want to calculate the Euclidean distance between these two coordinates using the obtained UTM coordinates. Obviously, the result is not correct because 27020.15 in zone 19 and 738166.37 is in zone 18, resulting in a distance of more than 480000 meters, which is not correct.
How can we use zone to calculate the correct distance between these two coordinates.
BTW, I know there are some methods to use the lat. and long. to calculate the distance, for example, here. But I thought maybe there should be a way to also use UTM with zones to calculate the distance.
Thanks.