lon2utmZone | R Documentation |
Determine the Universal Transverse Mercator zone that contains the given longitude coordinates.
lon2utmZone(lon, lat = NULL)
lon |
Numeric vector of longitudes. |
lat |
Numeric vector of latitudes, same length as |
A numeric vector giving the UTM zones (integers) containing the lon
.
If lat
is not NULL, then zones are corrected to account for
the special cases of Svalbard and parts of Norway.
Based on a function posted by Josh O'Brien on 8 Feb 2012 on stackoverflow [link]. and code for exceptions posted by wittrup on 13 Sep 2013 on stackoverflow [link].
mylon <- c(-82.27, NA, -122.44, 21.97, 21.97) mylat <- c(44.76, 37.77, 37.77, NA, 78.64) lon2utmZone(mylon) lon2utmZone(mylon, mylat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.