Get or set the coordinate reference system for the given layer.

mapLayer.crs(layer, parse = TRUE, ...)

mapLayer.setCrs(layer, value, parse = TRUE, ...)

mapLayer.crs(layer, ...) <- value

Arguments

layer

layer (or ID of the layer) from which features should be retrieved.

parse

if TRUE, returns the result as a rgdal::CRS object

...

low-level parameters (such as host and auth) to be passed on to qgisremote()

value

a QGIS-readable coordinate reference system specification, or an object of class rgdal::CRS

Value

If parse = TRUE: a rgdal::CRS object corresponding to the given layer's coordinate reference system. If parse = FALSE, a list of the coordinate system's specification in various formats (proj4, WKT, ...).

Details

Attention: setting the CRS does not cause the layer data to be reprojected! Manually setting the layer CRS should normally only be done when QGIS was not able to determine the correct format of the data.