rasterizeRegCM: Rasterize RegCM outout

View source: R/rasterizeRegCM.R

rasterizeRegCMR Documentation

Rasterize RegCM outout

Description

The output of RegCM data are (amongst others) a rasters containing the latitude and a longitude coordinates as well as raster of the data values. All raster, however, are not projected but only in column/rows. A simple assignment of the lat/lon coordinates to the data is not possible due to the irregular spacing between the lat/lon coordinates. Therefore, the data must first be converted to spatial points and projected to a metric reference system. The values can then be rasterized by creating a template raster of the extent and proj4string of the projected points as well as either (if known) the resolution of the target raster in meter or (if resolution unknown) the number of columns and rows from the original rasters. Note that often Model data need to be rotated and transposed.

The function also works for other data which are not projected but which have a latitude and a longitude raster as additional information.

Usage

rasterizeRegCM(
  x,
  lat,
  lon,
  res = NULL,
  transpose = TRUE,
  rotate = c("x", "y"),
  targetcrs = "+init=epsg:3031"
)

Arguments

x

A Raster layer or raster stack containing the values

lat

A raster layer containing the latitude coordinates as pixel values

lon

A raster layer containing the longitude coordinates as pixel values

res

A Vector containing the target x and y resolution

transpose

(requires documentation)

rotate

(requires documentation)

targetcrs

EPSG code or proj4String of the metric target reference system

Value

A RasterLayer or RasterStack object.

Author(s)

Hanna Meyer and Tim Appelhans


environmentalinformatics-marburg/Rsenal documentation built on July 28, 2023, 6:09 a.m.