Skip to contents

Clips all bands of each spatial resolution according to the given polygon.

Usage

clip_bands(sr, polygon)

# S3 method for class 'satres'
clip_bands(sr, polygon)

Arguments

sr

A satres object.

polygon

A sf polygon layer.

Value

A satres object.

Details

It performs the operation independently of the CRS of the polygon and preserves the CRS of the bands.

See also

satres

Other satellite transformation: merge_tiles(), select_bands()

Examples


file <- system.file("extdata", "lanjaron.gpkg", package = "satres")
lanjaron <- sf::st_read(file, layer = "lanjaron_bbox", quiet = TRUE)

esa <- system.file("extdata", "esa", package = "satres")
sr <- satres(dir = esa) |>
     clip_bands(polygon = lanjaron)