Learn R Programming

plotKML (version 0.2-4)

getCRS-methods: Methods to get the proj4 string

Description

Gets the proj4 string from a object of type "Spatial" or "Raster".

Usage

getCRS(obj, ...)

Arguments

obj
object of type "Spatial" or "Raster"
...
other optional arguments

Details

For more details about the PROJ.4 parameters refer to the http://trac.osgeo.org/proj/wiki/GenParms{http://trac.osgeo.org}.

See Also

sp::CRS, raster::raster, check_projection

Examples

Run this code
data(eberg_grid)
coordinates(eberg_grid) <- ~x+y
gridded(eberg_grid) <- TRUE
proj4string(eberg_grid) <- CRS("+init=epsg:31467")
r <- raster(eberg_grid[1])
getCRS(r)
r.ll <- reproject(r)
getCRS(r.ll)

Run the code above in your browser using DataLab