ursa_proj: Extract and assign projection of raster images.

Description Usage Arguments Value Author(s) Examples

Description

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

Usage

1
2
ursa_proj(obj)
ursa_proj(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.

Value

Extract function ursa_proj returns character value of $grid$proj4 item of ursaRaster object.

Replace function ursa_proj<- returns ursaRaster with modified $grid$proj4 item.

Author(s)

Nikita Platonov [email protected]

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
session_grid(NULL)
a <- ursa_dummy(nband=1)
print(ursa_proj(a))
p4s <- "+init=epsg:3576"
ursa_proj(a) <- p4s
print(ursa_proj(a))
fname <- tempfile()
write_envi(a,fname)
a2 <- read_envi(fname,resetGrid=TRUE)
print(ursa_proj(a2))
try(print(rgdal::CRSargs(sp::CRS(p4s))))
envi_remove(fname)

nplatonov/ursa documentation built on Oct. 18, 2018, 3:17 a.m.