Description Usage Arguments Details Value See Also Examples
View source: R/matchResolution.R
Successively projects (if necessary) and resamples a raster coordinate system and spatial resolution to the reference
1 | matchResolution(x, ref, method = "bilinear", filename = "", ...)
|
x |
Raster* object or list of Raster* objects. |
ref |
Reference Raster* object with parameters that |
method |
Character. Method used to compute values for the resampled
raster. Can be |
filename |
Character. Output file name including path to directory and
eventually extension. If |
... |
Other arguments passed to |
x
and ref
must have defined CRS (can be assigned using
projection
). If the CRS don't match, x
is
projected to ref
CRS prior to resampling. x
doesn't inherit the
extent of ref
.
Raster* object or list of Raster* objects.
resample
, projectRaster
,
projection
1 2 3 4 5 6 7 8 | # Load raster package
library(raster)
# Open ALS metric and Landsat BAP imagery
elev_p95 <- raster(system.file("extdata/examples/ALS_metrics_p95.tif",package="foster"))
BAP_2006 <- stack(system.file("extdata/examples/Landsat_BAP_2006.tif",package="foster"))
matchResolution(x = elev_p95,ref = BAP_2006,method='bilinear')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.