View source: R/createLandwatermask.R
createLandwatermask | R Documentation |
This function creates a land-water-mask as a grid based on given dimension and coordinates.
createLandwatermask(dataset.landwater, dimension, origin, resolution=1)
dataset.landwater |
A dataset containing the percentage of land on a cell of a grid. The coordinates of the cell should be given as longitude (named: long) and lattude (named: lat) and the percentage of land shoud be named landsum. If the value of 'dataset.landwater' is 'NULL', a grid containing only land-cells will be created. |
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 land-water-mask as a grid. As Input a dataset with land-water-information is needed. The grid will be created with a given dimension.
This function returns a grid which contains the land-water information of the observed area. The value of cells containing land is 0, the value of water-cells is -1.
Maximilian Lange, Sven Lautenbach
##load data
data(dataset.all.species)
data(dataset.landwater)
##create grid parameters
dimension <- getDimension(dataset.all.species, resolution=1)
origin <- getOrigin(dataset.all.species)
##create landwatermask
landwatermask.nocoast <- createLandwatermask(dataset.landwater,
dimension, origin, resolution=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.