utm_zone: Given a spatial object, calculate the UTM zone of the...

Description Usage Arguments Details Examples

Description

For a line or polygon, the UTM zone of the centroid is given, after reprojecting the object into WGS-84.

Usage

1
2
3
4
5
6
7
utm_zone(x, y, proj4string = FALSE)

## S4 method for signature 'numeric,numeric'
utm_zone(x, y, proj4string = FALSE)

## S4 method for signature 'Spatial,missing'
utm_zone(x, proj4string)

Arguments

x

a longitude (with western hemisphere longitudes negative), or a Spatial object

y

a latitude (with southern hemisphere latitudes negative), or missing (if x is a Spatial object)

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.

Details

Based on the code on gis.stackexchange.com at http://bit.ly/17SdcuN.

Examples

1
2
3
utm_zone(45, 10)
utm_zone(45, -10)
utm_zone(45, 10, proj4string=TRUE)

azvoleff/teamlucc documentation built on June 4, 2017, 12:08 a.m.