setCRS: Set (or transform) the coordinate reference system of a...

Description Usage Arguments Details Value See Also

Description

Set (or transform) the coordinate reference system of a spatial object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
setCRS(x, crs, ...)

## S4 method for signature 'ANY'
setCRS(x)

## S4 method for signature 'geom'
setCRS(x, crs = NULL)

## S4 method for signature 'Spatial'
setCRS(x, crs = NULL)

## S4 method for signature 'sf'
setCRS(x, crs = NULL)

## S4 method for signature 'Raster'
setCRS(x, crs = NULL)

Arguments

x

the object for which to set the coordinate reference system.

crs

[character(1)]
the coordinate reference system to set for this object.

...

other arguments.

Details

In case an object does not yet have a coordinate reference system assigned, this function simply assigns it. In case the object has already a valid crs, a transformation to the new crs will be carried out. The transformation is computed for all classes with the standard defined in the rgdal package.

Value

The object x with an assigned or transformed coordinate reference system.

See Also

Other setters: setFeatures(), setGroups(), setHistory(), setWindow()


geometr documentation built on Sept. 21, 2021, 1:07 a.m.