Learn R Programming

satellite (version 0.1.0)

projectSatellite: Reproject a 'Satellite' object

Description

Reproject a satellite object. Either a template or crs must be supplied. If crs is not supplied, alignGeometry is called.

Usage

## S3 method for class 'Satellite':
projectSatellite(x, template, band_codes, type, crs,
  method = c("bilinear", "ngb"))

Arguments

x
Satellite or Raster* object to be resampled.
template
Raster* or spatial data set from which geometry can be extracted.
band_codes
Band ID(s) to be resampled. If not supplied and type is not given, too, all bands will be considered for resampling.
type
Type of bands (e.g. VIS, NIR) which should be considered. If not supplied, all types will be processed depending and bands to be processed can be defined by band_codes.
crs
character or object of class 'CRS'. PROJ.4 description of the coordinate reference system. See projectRaster for details.
method
Method for resampling; "bilinear" for bilinear interpolation (default) or "ngb" for nearest neighbor interpolation. See e.g. resample, projectRaster.

Examples

Run this code
path <- system.file("extdata", package = "satellite")
files <- list.files(path, pattern = glob2rx("LC8*.tif"), full.names = TRUE)
sat <- satellite(files)

projectSatellite(sat, crs = "+init=epsg:4326", band_codes = "B001n")

Run the code above in your browser using DataLab