Learn R Programming

sperich (version 1.5-8)

createLandwatermask: 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, shift, resolution=1)

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.

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.

shift

The geographic coordinates of the origin of the grid.

resolution

The resolution of the grid in (geographical) degree.

Author

Maximilian Lange, Sven Lautenbach

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.

Examples

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

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

##create landwatermask
landwatermask.nocoast <- createLandwatermask(dataset.landwater, 
					dimension, shift, resolution=1)

Run the code above in your browser using DataLab