transformCRS: Transform a spatial dataset to a different coordinate...

View source: R/transformCRS.R

transformCRSR Documentation

Transform a spatial dataset to a different coordinate reference system

Description

Function to transform a spatial dataset to a different coordinate reference system.

Usage

transformCRS(layer, toCRS)

Arguments

layer
  • spatial data layer to transform

toCRS
  • representation of final coordinate reference system (see @details)

Details

If layer is an object of class sf, sfc, or sfg, then toCRS should be convertible to an sf::crs object via get_crs(toCRS).

if layer is a sf::bbox object, the bbox is transformed using transformBBox.

#–If layer is an object of class Spatial, then toCRS should be convertible to an sp::CRS object via get_spCRS(toCRS) .

Value

spatial layer of same type as input (sf or sp)


wStockhausen/wtsGIS documentation built on Aug. 23, 2023, 2:31 a.m.