Learn R Programming

sperich (version 1.4-0)

createHeightmask: Height-Mask Creation

Description

This function creates a height-mask as a grid based on given dimension and coordinates.

Usage

createHeightmask(dataset.height, dimension, shift, resolution=1)

Arguments

dataset.height
A dataframe containing the longitude and lattitude of the grid cell location as 'long' and 'lat' and the height of the cell as 'height'. If the value of 'dataset.height' is 'NULL', the returned grid contains 0 as height-information of every cel
dimension
The dimension of the processed grid.
shift
The geographic coordinates of the origin of the grid.
resolution
The resolution of the grid in (geographical) degree.

Value

  • This function returns a grid which contains the height information of the observed area.

Details

This routine creates a height-mask as a grid. As Input a dataset with height-information is needed. The grid will be created with a given dimension.

Examples

Run this code
##load data
data(dataset.all.species)
data(dataset.height)

##create grid parameters
dimension <- getDimension(dataset.all.species, resolution=1)
shift <- getShift(dataset.all.species)

##create height-matrix
height.matrix <- createHeightmask(dataset.height, dimension, shift, resolution=1)

Run the code above in your browser using DataLab