Description Usage Arguments Details Value Examples
View source: R/match_rasters.R
Match the coordinate system and extent of two rasters
1 | match_rasters(baseimg, matchimg, filename, method = "bilinear", ...)
|
baseimg |
A /codeRaster* to use as the base image. This layer will determine the output coordinate system. |
matchimg |
A /codeRaster* to match to the base image. If necessary the /codematchimg will be reprojected to match the coordinate system of the /codebaseimg. The /codematchimg will then be cropped and extended to match the extent of the /codebaseimg. |
filename |
file on disk to save |
method |
the method to use if projection is needed to match image coordinate systems, or if resampling is needed to align image origins. Can be "ngb" for nearest-neighbor, or "binlinear" for bilinear interpolation |
... |
additional arguments to pass to |
Note that match_rasters
can run in parallel if
beginCluster()
is run prior to running match_rasters
.
The /codematchimg reprojected (if necessary), cropped, and extended to match the /codebaseimg.
1 2 3 4 5 | # Mosaic the two ASTER DEM tiles needed to a Landsat image
DEM_mosaic <- mosaic(ASTER_V002_EAST, ASTER_V002_WEST, fun='mean')
# Crop and extend the DEM mosaic to match the Landsat image
matched_DEM <- match_rasters(L5TSR_1986, DEM_mosaic)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.