Learn R Programming

sits (version 0.13.0)

sits_view: Generic interface for visualization of data cube

Description

Uses mapview to visualize raster cube and classified images

Usage

sits_view(x, ...)

# S3 method for raster_cube sits_view(x, ..., red, green, blue, time = 1, roi = NULL)

# S3 method for classified_image sits_view(x, ..., map = NULL, time = 1, legend = NULL)

Arguments

x

object of class "raster_cube" or "classified image"

...

further specifications for sits_view.

red

band for red color.

green

band for green color.

blue

band for blue color.

time

temporal instances to be plotted.

roi

sf object giving a region of interest.

map

map to overlay (mapview object)

legend

named vector that associates labels to colors

Value

mapview object

Examples

Run this code
# NOT RUN {
data_dir <- system.file("extdata/raster/cbers", package = "sits")

cbers_022024 <- sits_cube(
    source = "LOCAL",
    name = "cbers_022024",
    satellite = "CBERS-4",
    sensor = "AWFI",
    resolution = 64,
    data_dir = data_dir,
    parse_info = c("X1", "X2", "tile", "band", "date")
)
# plot the data cube
sits_view(cbers_022024, red = "B15", green = "B16", blue = "B13", time = 1)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab