Description Usage Arguments Details Value References Examples
View source: R/s1_proc_inputs.R
This function returns the UTM zone for a given set of latitude/longitude.
1 | zone_from_ll(lon, lat)
|
lon |
A numeric vector of longitudes |
lat |
A numeric vector of latitudes |
This function takes a point and calculates the correct UTM zone in which that point falls. It was developed based on answers to a Stack Overflow post (see below).
Returns an integer vector of UTM zones the same length as the
inputs lon and lat
Based on the answers to the Stack Overflow post found here:
https://stackoverflow.com/questions/9186496/determining-utm-zone-to-convert-from-longitude-latitude
1 2 3 4 5 6 7 8 | #UTM grid for Ft. Lauderdale, FL, USA
zone_from_ll(lon = -80.15, lat = 26.133333)
#UTM grid for Rome, Italy; Paris, France; London, UK
ll_df <- data.frame(city = c("Rome", "Paris", "London"),
lon = c(12.5, 2.3508, -0.1275),
lat = c(41.9, 48.8567, 51.507222))
zone_from_ll(lon = ll_df$lon, lat = ll_df$lat)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.