Crop and harmonise predictors, such as climate and soil data
harmonise_raster.Rd
This function takes a raster data and a polygon of the area of interest, crops the raster data to the area of interest, and harmonizes the projection and extent of the cropped raster data to match that of the polygon.
Value
a Spat raster object of the predictor with the same extent and area of batas_kab
A SpatRaster object representing the cropped and harmonized predictor, with the same extent and area as the batas_kab
object.
Examples
worldclim_temp_indo <- LUMENSR_example("wc2.1_30s_bio_1_indo.tif")
temp_indo <- terra::rast(worldclim_temp_indo)
harmonise_raster(dat_clim = temp_indo, batas_kab = ntt_admin)
#> class : SpatRaster
#> dimensions : 197, 377, 1 (nrow, ncol, nlyr)
#> resolution : 1833.499, 1833.499 (x, y)
#> extent : 51248.79, 742477.9, 8779377, 9140576 (xmin, xmax, ymin, ymax)
#> coord. ref. : WGS 84 / UTM zone 51S (EPSG:32751)
#> source(s) : memory
#> name : wc2.1_30s_bio_1
#> min value : 16.81118
#> max value : 28.24243