getCRS: Get the coordinate reference system of a spatial object.

Description Usage Arguments Value See Also Examples

Description

Get 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
getCRS(x, ...)

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

## S4 method for signature 'geom'
getCRS(x)

## S4 method for signature 'Spatial'
getCRS(x)

## S4 method for signature 'sf'
getCRS(x)

## S4 method for signature 'Raster'
getCRS(x)

Arguments

x

the object from which to extract the coordinate reference system.

...

other arguments.

Value

The coordinate reference system of x given as proj4string.

See Also

Other getters: getCols(), getExtent(), getFeatures(), getGroups(), getHistory(), getLayers(), getNames(), getPoints(), getRes(), getRows(), getType(), getWindow()

Examples

1
2
3
4
5
6
7
getCRS(x = gtGeoms$grid$continuous)

library(sf)
nc_sf <- st_read(system.file("shape/nc.shp", package="sf"), quiet = TRUE)
getCRS(nc_sf)

getCRS(x = gtRasters$categorical)

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