getSpatRasterTemplate: Function to initialise an empty SpatRaster for the UK or a...

View source: R/spCEH.R

getSpatRasterTemplateR Documentation

Function to initialise an empty SpatRaster for the UK or a sub-region

Description

Function to initialise an empty SpatRaster for the UK or a sub-region

Usage

getSpatRasterTemplate(domain = "UK", res = 100, proj = NULL)

Arguments

domain

Domain of the output raster: "UK", "Scotland" etc.

res

Resolution of the output raster in metres (for OSGB) or decimal degrees (WGS84). For the 'UK_NAME' domain, the res is pre-specified.

proj

CRS (coordinate reference system) of the output raster: "OSGB" or "WGS84".

Value

An empty SpatRaster (from the terra package) object covering the domain.

Examples

r <- getSpatRasterTemplate(domain = "UK", res = 10000, proj = 'OSGB')
r <- getSpatRasterTemplate(domain = "Scotland", res = 10000, proj = 'OSGB')
r <- getSpatRasterTemplate(domain = "NT_10km", res = 100, proj = 'OSGB')
r <- getSpatRasterTemplate(domain = "UK", res = 10000, proj = 'OSGB')
r <- getSpatRasterTemplate(domain = "UK", res = 0.1, proj = 'WGS84')
r <- getSpatRasterTemplate(domain = "UK_NAME", proj = 'WGS84')
r <- getSpatRasterTemplate(domain = "UK_NAME", proj = 'WGS84')

NERC-CEH/spCEH documentation built on June 12, 2024, 2:45 p.m.