View source: R/align_rasters.R
alignRasters | R Documentation |
Aligns multiple rasters with a single reference raster. A raster will be aligned if it doesn't match the dimensions, resolution, extent, origin, or CRS projection of the reference raster.
alignRasters(referenceRaster = NULL, inputRasters = NULL)
referenceRaster |
A |
inputRasters |
A list of |
Projecting a raster requires that its cell values be estimated in accordance with its new projection. Continuous variable rasters will use bilinear interpolation while categorical (factor) rasters will use nearest-neighbor sampling.
A list of SpatRaster
objects that share the same grid and
projection as referenceRaster
.
Tate Brasel https://github.com/tabrasel
#library(TerrainWorksUtils) # #referenceRaster <- terra::rast("C:/Work/netmapdata/Puyallup/elev_puy.flt") # #inputRasters <- list( # gradient = terra::rast("C:/Work/netmapdata/Puyallup/grad_15.tif"), # lithology = terra::rast("C:/Work/netmapdata/Puyallup/litho.tif") # ) # #alignedRasters <- alignRasters(referenceRaster, inputRasters) #
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.