SpatialGridTopography: Creates a 'SpatialGridTopography'

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Function SpatialGridTopography creates an object of class SpatialGridTopography-class containing topographic variables over a landscape.

Usage

1
2
SpatialGridTopography(grid, elevation, slope = NULL, aspect = NULL, 
                      proj4string = CRS(as.character(NA)))

Arguments

grid

An object of class GridTopology-class or SpatialGrid-class.

elevation

A vector of elevation values for all cells of the grid (in m.a.s.l.).

slope

A vector of slope angles for all cells of the grid (in degrees). If slope=NULL, slope is calculated as indicated in details.

aspect

A vector of aspect angles for all cells of the grid (in degrees from North clockwise ). aspect=NULL, aspect values are calculated as indicated in details.

proj4string

An object of class CRS-class.

Details

Slope and aspect calculations were adapted from functions in package 'SDMTools', which used the approach described in Burrough & McDonell (1998).

The rate of change (delta) of the surface in the horizontal (dz/dx) and vertical (dz/dy) directions from the center cell determines the slope and aspect. The values of the center cell and its eight neighbors determine the horizontal and vertical deltas. The neighbors are identified as letters from 'a' to 'i', with 'e' representing the cell for which the aspect is being calculated. The rate of change in the x direction for cell 'e' is calculated with the algorithm:

[dz/dx] = ((c + 2f + i) - (a + 2d + g) / (8 * x_cell_size)

The rate of change in the y direction for cell 'e' is calculated with the following algorithm:

[dz/dy] = ((g + 2h + i) - (a + 2b + c)) / (8 * y_cell_size)

The algorithm calculates slope as: rise_run = sqrt ( [dz/dx]2 + [dz/dy]2 ]).

From this value , one can calculate the slope in degrees or radians as:

slope_degrees = ATAN (rise_run) * 57.29578

slope_radians = ATAN (rise_run)

Taking the rate of change in both the x and y direction for cell 'e', aspect is calculated using:

aspect = 57.29578 * atan2 ([dz/dy], -[dz/dx])

The aspect value is then converted to compass direction values (0-360 degrees).

Value

Function SpatialGridTopography returns an object 'SpatialGridTopography-class'.

Author(s)

Miquel De Cáceres Ainsa, Biodiversity and Landscape Ecology Laboratory, Centre Tecnologic Forestal de Catalunya

References

Burrough, P. A. and McDonell, R.A., 1998. Principles of Geographical Information Systems (Oxford University Press, New York), p. 190.

See Also

extractSpatialData, SpatialGridTopography-class

Examples

1
2
3
4
5
6
7
8
data(examplegridtopography)

#Display data
spplot(examplegridtopography, variable="elevation", scales=list(draw=TRUE))

#Grids can be subsetted
sgt = examplegridtopography[1:50, 1:50]
spplot(sgt, variable="elevation", scales=list(draw=TRUE))

miquelcaceres/meteoland documentation built on May 8, 2019, 11:57 p.m.