ursa_proj: Extract and assign projection of raster images.

ursa_crsR Documentation

Extract and assign projection of raster images.

Description

Functions manipulate with $crs item of the ursaGrid object, which is embedded in the ursaRaster object (obj$grid$crs). Projection is specified in PROJ.4 notation.

Usage

ursa_crs(obj)
ursa_crs(obj, keepGrid = FALSE) <- value

Arguments

obj

ursaRaster object. It is allowed ursaGrid object for ursa_proj (Extract) function.

keepGrid

Logical. Should sessional grid be changed after assignment. Default is FALSE.

value

Character sting in PROJ.4 format.

Details

Boath Extract and Replace functions ursa_proj() and ursa_proj4() are synonyms for ursa_crs.

Value

Extract function ursa_crs returns character value of $grid$crs item of ursaRaster object.

Replace function ursa_crs<- returns ursaRaster with modified $grid$crs item.

Author(s)

Nikita Platonov platonov@sevin.ru

Examples

session_grid(NULL)
a <- ursa_dummy(nband=1)
print(ursa_crs(a))
p4s <- "+init=epsg:3576"
ursa_crs(a) <- p4s
print(ursa_crs(a))
fname <- tempfile()
write_envi(a,fname)
a2 <- read_envi(fname,resetGrid=TRUE)
print(ursa_crs(a2))
try(print(rgdal::CRSargs(sp::CRS(p4s))))
envi_remove(fname)

ursa documentation built on Dec. 28, 2022, 2:18 a.m.