Saturday 17 November 2018

R: Return the UTM zone that a WGS84 point belongs to


I'm looking for an R function that might work similarly to this website that will tell you what UTM zone your WGS84 point belongs to.


http://www.rcn.montana.edu/resources/converter.aspx



Answer



Each UTM zone is 6 degrees wide, so you can get the zone number by looking at the longitude:


floor((longitude + 180) / 6) + 1

This assumes that you have longitude within [-180.0, 180.0).


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...