Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

getCRS

Get the coordinate reference system of a spatial object.


Description

Get the coordinate reference system of a spatial object.

Usage

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

Examples

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

Generate and Modify Interoperable Geometric Shapes

v0.2.10
GPL-3
Authors
Steffen Ehrmann [aut, cre] (<https://orcid.org/0000-0002-2958-0796>), Dan Sunday [cph] (fast point-in-polygon algorithm.)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.