View source: R/utility_functions.R
alginCustomRaster | R Documentation |
Align raster extent with template grid
alginCustomRaster(
inputPath = "./MEWCustom/MEW_new.tif",
RES = 75,
CRS = "epsg:3111",
EXTENT = c(2126550, 2941050, 2258825, 2828075),
outPath = NULL
)
inputPath |
the path to the raster to be processed to match template grid |
RES |
the Resolution of the template grid ( units depend on CRS) for FAME it will be 75 0r 225 metres |
CRS |
in form acceptable for terra::crs() function of default VicGrid94 given as "epsg:3111" |
EXTENT |
extent of the template raster as vector giving xmin ,ymin xmax,ymax in same units as resolution. |
outPath |
path to ouptut file to (folder path) if null then file is output to same directory as input with RES_cutom.tif appended to filename |
outputRaster of same extent, resolution and CRS as the template settings
terra::writeRaster(terra::rast(matrix(10,10,10),ext=c(143,143.3,-36,-35.7),crs="epsg:4283" ),"temp.tif",overwrite=TRUE)
alginCustomRaster(inputPath ="./temp.tif", RES = 75, CRS="epsg:3111",EXTENT = c(2126550, 2941050, 2258825, 2828075 ))
unlink("./temp_75_custom.tif")
unlink("temp.tif")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.