projectRaster_rigorous: Performs an area-weighted resampling of raster datasets.

Description Usage Arguments Details Author(s) See Also

View source: R/projectRaster_rigorous.R

Description

Performs an area-weighted resampling of raster datasets.

Usage

1
2
projectRaster_rigorous(from, to, method = "mode", na.rm = FALSE,
  verbose = FALSE, ...)

Arguments

from

Raster* The sources raster to be resampled.

to

Raster* A target raster that the from will be resampled to (extent, resolution, projection).

method

Character. Default is "mode". See details.

na.rm

Logical. Remove NAs before calculating cell stats?

verbose

logical. Enable verbose execution? Default is FALSE.

...

Currently unsupported.

Details

This function is designed to solve the problem of resampling/reprojecting rasters using area-based, not point based (e.g. nearest neighbor, bilinear, cubic convolution), resampling. The output pixel is a function of the areas of the input pixels, so this should be used for resampling from a finer resolution to a coarser resolution.

The method defaults to "mode", which will return the value covering the largest area of the output pixel area. Other methods will be added in the future.

A word of warning: this algorithm is SLOW. The function uses focal_hpc, so we highly recommend using it with a foreach engine running (e.g. use sfQuickInit() ). Keep in mind this is a "dirty" parallel problem, so different chunks may execute at different speeds and have different memory footprints.

Author(s)

Jonathan A. Greenberg

See Also

projectRaster, extract, aggregate


azvoleff/spatial.tools documentation built on June 4, 2017, 12:08 a.m.