For a line or polygon, the UTM zone of the centroid is given, after reprojecting the object into WGS-84.
Usage
utm_zone(x, y, proj4string = FALSE)
# S4 method for class 'numeric,numeric'
utm_zone(x, y, proj4string = FALSE)
# S4 method for class 'SpatVector,missing'
utm_zone(x, proj4string)Arguments
- x
a longitude (with western hemisphere longitudes negative), a
Spatialobject, or aSpatVectorobject- y
a latitude (with southern hemisphere latitudes negative), or missing (if x is a
SpatialorSpatVectorobject)- proj4string
if FALSE (default) return the UTM zone as a string (for example "34S" for UTM Zone 34 South). If TRUE, return a proj4string using the EPSG code as an initialization string.