Learn R Programming

lakemorpho (version 1.3.2)

lakeSurroundTopo: Calculate surrounding topography for lake

Description

This function combines all input datasets into a lakeMorphoClass. As a part of this combination, the surrounding topography is also determined. If no input catchments are used, it is assumed that a buffer equal to the maximum in lake distance is used. If an input catchement is used, then the surrounding topography is the land area represented by the catchements that intersect the lake. This function (and all of lakemorpho) expect clean polygons. No internal checking (e.g. for proper encoding of holes, etc.) is done.

Usage

lakeSurroundTopo(
  inLake,
  inElev = NULL,
  inCatch = NULL,
  reso = ifelse(!is.null(inElev), res(inElev)[1], 10)
)

Value

Returns an object of class 'lakemorpho' that includes the surrounding topography of the lake.

Arguments

inLake

a SpatialPolygons or SpatialPolygonsDataFrame representing the input lake. Required.

inElev

a RasterLayer representing the elevation around the lake. Required.

inCatch

Optional SpatialPolygons or SpatialPolygonsDataFrame defining the Surrounding Topography. Default is NULL which uses a buffer equal to the maximum in lake distance.

reso

Optional resolution for raster output (e.g. lake distance). Defaults to the resolution of inElev

Examples

Run this code
# \donttest{
data(lakes)
inputLM<-lakeSurroundTopo(exampleLake,exampleElev)
inputLM
# }

Run the code above in your browser using DataLab