createLandwatermask {sperich} | R Documentation |
Land-Water-Mask Creation
Description
This function creates a land-water-mask as a grid based on given dimension and coordinates.
Usage
createLandwatermask(dataset.landwater, dimension, origin, resolution=1)
Arguments
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. |
Details
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.
Value
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.
Author(s)
Maximilian Lange, Sven Lautenbach
Examples
##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)