Learn R Programming

sits (version 1.5.2)

plot.dem_cube: Plot DEM cubes

Description

Plot RGB raster cube

Usage

# S3 method for dem_cube
plot(
  x,
  ...,
  band = "ELEVATION",
  tile = x[["tile"]][[1]],
  roi = NULL,
  palette = "Spectral",
  rev = TRUE,
  scale = 1,
  max_cog_size = 1024,
  legend_position = "inside"
)

Value

A plot object with a DEM cube or a B/W image on a color scale

Arguments

x

Object of class "dem_cube".

...

Further specifications for plot.

band

Band for plotting grey images.

tile

Tile to be plotted.

roi

Spatial extent to plot in WGS 84 - named vector with either (lon_min, lon_max, lat_min, lat_max) or (xmin, xmax, ymin, ymax)

palette

An RColorBrewer palette

rev

Reverse the color order in the palette?

scale

Scale to plot map (0.4 to 1.0)

max_cog_size

Maximum size of COG overviews (lines or columns)

legend_position

Where to place the legend (default = "inside")

Author

Gilberto Camara, gilberto.camara@inpe.br

Examples

Run this code
if (sits_run_examples()) {
# obtain the DEM cube
    dem_cube_19HBA <- sits_cube(
        source = "MPC",
        collection = "COP-DEM-GLO-30",
        bands = "ELEVATION",
        tiles = "19HBA"
        )
# plot the DEM reversing the palette
    plot(dem_cube_19HBA, band = "ELEVATION")
}

Run the code above in your browser using DataLab