Lat /long to northing and easting conversion taking account of the Zone

2283
1
05-21-2018 06:32 PM
HugoBouckaert1
New Contributor III

Hi 

I am wondering if anyone has some python code (including the maths) to convert from lat / long to northing and easting, allowing the inclusion of a particular zone for the conversion.  I found this code: 

https://anuga.anu.edu.au/svn/anuga/trunk/anuga_core/anuga/coordinate_transforms/lat_long_UTM_convers... 

The returned northing and easting  values from the function LLtoUTM (lat long to UTM conversion) also returns the zone to you, but the function does not not allow you to use a zone for input. When I used this function, my input were lat / longs that span two zones, Zone 50 and Zone 51. The northings and eastings returned for Zone 50 lined up with what I was expecting in terms of location, but the northings and eastings from Zone 51 also seem to end up in Zone 50, which meant the returned eastings were not offset to the east, with the points ending up in the Indian Ocean!

So what I am looking for is a function that converts lat / longs to northings and eastings (and vice versa) with the zone also included as an input parameter and included in the calculation,so that lat /longs in Zone 50 will return northings and eastings correct for  Zone 50 and Lat Longs for Zone 51 will return northings and eastings correct for Zone 51. 

    

Thanks

Hugo

0 Kudos
1 Reply
NeilAyres
MVP Alum

This is a GIS forum, so why would you actually want to do these calculations yourself?

On the subject of UTM zones, each one is the same grid, but calculated on a particular central meridian (line of longitude). Zone 50 = 117degE; Zone 51 = 123degE