View source: R/createHeightmask.R
createHeightmask | R Documentation |
This function creates a height-mask as a grid based on given dimension and coordinates.
createHeightmask(dataset.height, dimension, origin, resolution=1)
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 cell. |
dimension |
The dimension of the processed grid. |
origin |
The geographic coordinates of the origin of the grid. |
resolution |
The resolution of the grid in (geographical) degree. |
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.
This function returns a grid which contains the height information of the observed area.
Maximilian Lange, Sven Lautenbach
##load data
data(dataset.all.species)
data(dataset.height)
##create grid parameters
dimension <- getDimension(dataset.all.species, resolution=1)
origin <- getOrigin(dataset.all.species)
##create height-matrix
height.matrix <- createHeightmask(dataset.height, dimension, origin, resolution=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.