st_transform_auto: Toggle between lon/lat and UTM co-ordinates

View source: R/st_transform_auto.R

st_transform_autoR Documentation

Toggle between lon/lat and UTM co-ordinates

Description

It is often useful to convert geographic data to a projected co-ordinate system, e.g. for specifying a buffer distance in metres. st_transform_auto converts between lon/lat co-ordinates and the UTM or UPS zone for the centroid of the data.

Usage

st_transform_auto(data, check = TRUE, quiet = FALSE)

Arguments

data

An sf object.

check

Should the function check if the chosen UTM zone covers all the data? If so then a warning is issued if the centroid of any row in the data is more than 1ยบ outside the area covered by the UTM zone.

quiet

if set to TRUE, messages reporting the values of any parameters set automatically will be suppressed. The default is FALSE.

Value

SF object transformed to new CRS.


sfhotspot documentation built on Aug. 8, 2025, 7:26 p.m.