ursa_grid: Extract and assign spatial parameters of raster images.

Description Usage Arguments Details Value Author(s) Examples

Description

Raster image (ursaRaster) contains embedded spatial parameters (ursaGrid) in item $grid. These functions manipulate with item $grid.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
ursa_grid(obj)
ursa_grid(obj) <- value

ursa_ncol(obj)
ursa_nrow(obj)
ursa_columns(obj)
ursa_rows(obj)
ursa_samples(obj)
ursa_lines(obj)

ursa_extent(obj)
ursa_bbox(obj)

consistent_grid(obj, ref, expand = 1, border = rep(0, 4))

Arguments

obj

ursaRaster object. For ursa_grid function list of ursaRaster objects is allowed.

value

ursaGrid object.

ref

ursaGrid reference object.

expand

Podsitive numeric. Multiplier of boundary box.

border

integer of length 1 or 4. If length 4, then vector (bottom, left, top, right) in cells for extent expand. If length <4, then value is repeated for length 4. Passed to regrid().

Details

ursa_grid<- may used to minor corrections of spatial parameters. Howevert, it seems that this function is not claimed in practice.

ursa_ncol, ursa_columns, ursa_samples are synonyms for extracting number of columns/samples.

ursa_nrow, ursa_rows, ursa_lines are synonyms for extracting number of rows/lines.

ursa_extent, ursa_bbox, are synonyms for extracting boundary box (spatial extent).

consistent_grid trasforms dimension (ursa_nrow() by ursa_ncol()) obj-grid to dimension of ref-grid. This helpful for multipanel plotting if objects have different boundary boxes.

Value

ursa_grid return value of $grid item of ursaRaster object.

ursa_grid<- return ursaRaster with modified $grid item.

ursa_ncol, ursa_columns, ursa_samples return integer of length 1.

ursa_nrow, ursa_rows, ursa_lines return integer of length 1.

ursa_extent, ursa_bbox return numeric of length 4 (xmin, ymin, xmax, ymax).

ursa_consistent returns ursaGrid object.

Author(s)

Nikita Platonov platonov@sevin.ru

Examples

1
2
3
4
5
session_grid(NULL)
a <- pixelsize()
print(ursa_grid(a))
ursa_grid(a)$crs <- gsub("\\.0+","",ursa_grid(a)$crs)
print(ursa_grid(a))

ursa documentation built on May 23, 2021, 1:06 a.m.