Learn R Programming

satellite (version 1.0.5)

extend: Extend a Satellite object

Description

The function is a wrapper around extend to easily extend a Satellite object to a larger spatial extent.

Usage

# S4 method for Satellite
extend(x, y, subset = TRUE, value = NA)

Value

A Satellite object consisting of extended layers only or, if subset = FALSE, a Satellite object with the extended layers appended.

Arguments

x

Satellite object.

y

Target Extent, see extent.

subset

Logical. If TRUE (default), all layers but the extended ones are being dropped, else the extended layers are appended to the initial Satellite object.

value

Fill value assigned to new cells passed to extend, defaults to NA.

See Also

This function is a wrapper around extend.

Examples

Run this code
if (FALSE) {
## sample data
path <- system.file("extdata", package = "satellite")
files <- list.files(path, pattern = glob2rx("LC08*.TIF"), full.names = TRUE)
sat <- satellite(files)

## geographic extent of georg-gassmann-stadium (utm 32-n)
ext_ggs <- raster::extent(482606.4, 482781.4, 5627239, 5627489)

## extend satellite object by specified extent
sat_ggs <- extend(sat, ext_ggs)

plot(sat)
plot(sat_ggs)
}

Run the code above in your browser using DataLab