Learn R Programming

geometr (version 0.2.10)

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 ANY getCRS(x)

# S4 method for geom getCRS(x)

# S4 method for Spatial getCRS(x)

# S4 method for sf getCRS(x)

# S4 method for 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

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab