display: Plot raster image(s) in the PNG format.

displayR Documentation

Plot raster image(s) in the PNG format.

Description

High-level function to create multi-panel layout of images and to display with decoration (gridlines, coastlines, scalebar, colorbars) in the PNG format. It is an aggregator of low-level functions for typical plotting.

Usage

display(obj, ...)

Arguments

obj

Object of class ursaRaster or list of ursaRaster objects.

...

Passed to either display_brick or display_stack or display_rgb functions and further to hierarchy of plotting functions:

  • compose_open

    • compose_design

  • compose_plot

    • panel_new

    • panel_raster

    • panel_decor

      • panel_graticule

      • panel_coastline

      • panel_scalebar

      • panel_annotation

    • compose_legend

  • compose_close

Details

If argument obj is missing (e.g, calling display() without parameters) then plotting the sessional CRS with blank image.

If argument obj is list of ursaRaster objects (or object of class ursaStack) then display_stack is called.

If argument obj is object of class ursaRaster and has 3 or 4 bands and values in each band are integer and in interval between 0 and 255, then display_rgb is called.

If argument obj is object of class ursaRaster then firstly internal test is applied to detect either image's bands contains homogeneous information (raster brick) or heterogeneous information (raster stack). Then either display_brick or display_stack is called. This test is rough due to unknown data origin. It is supposed to adjust kind of plotting by means of direct specification of display_brick or display_stack.

Value

Returned value from either display_brick or display_stack or display_rgb functions.

Author(s)

Nikita Platonov platonov@sevin.ru

See Also

display_brick, display_stack, display_rgb

R-styled plotting: plot, image

Examples

session_grid(NULL)
set.seed(500)
a.brick <- a.stack <- ursa_dummy(nband=3,min=0,max=255,mul=1/16)
a.stack[2] <- a.stack[2]/10
a.stack[3] <- sqrt(a.stack[3])
a.rgb <- as.integer(round(a.brick))
print(a.brick)
print(a.stack)
print(a.rgb)
display(a.brick,decor=FALSE)
display(a.stack,decor=FALSE)
display(a.rgb)

ursa documentation built on March 18, 2022, 6:23 p.m.