Create template and region of interest (ROI) rasters in an output directory based on input vector ROI, resolution and projection.
createDomain.Rd
Create template and region of interest (ROI) rasters in an output directory based on input vector ROI, resolution and projection.
Arguments
- domain
SpatVect or SimpleFeatures object contianing the domain of the analysis. If this contains multiple features, they will be aggregated.
- res
Resolution, in project units, of the output template and mask rasters. Defaults to 100.
- proj
Projection (CRS) object for the template and mask rasters to be produced, as epsg string eg. "epsg:3308". If none is provided, will use projection of input domain.
- outdir
Output directory to write the rasters
- quiet
Write progress diagnostics (TRUE/FALSE)
- overwrite
Overwrite files (TRUE/FALSE)
Examples
library(terra)
#> terra 1.7.83
data("ROI")
ROI <- vect(ROI)
test <- createDomain(ROI, res=50, outdir="../test",quiet=FALSE)
#> [1] "No projection provided, using projection from input domain."
#> [1] "Projection is: epsg:28355"
#> [1] "Aggregating domain polygons into single polygon."
#> [1] "Creating template raster."
#> [1] "Raster extent: ext(522572.294629247, 524872.294629247, 5246758.06171584, 5249658.06171584)"
#> [1] "Raster resolution: 50 x 50"
#> [1] "Raster size: 46 x 58"
#> [1] "Masking template by domain."
#> [1] "Writing template."
#> [1] "Writing mask"
#> [1] "Writing vector ROI"
plot(test$mask)