catchment: find upstream catchments

Description Usage Arguments Value References Examples

View source: R/spatial.R

Description

find all upstream catchments given coordinates of a point within a catchment covered by digHAO (digital version of the hydrological atlas of austria)

Usage

1
2
3
4
5
6
7
8
catchment(
  catchments_digHAO,
  lonlat,
  proj4string = sp::CRS("+init=epsg:4326"),
  make.plot = TRUE,
  rivers_digHAO,
  ...
)

Arguments

catchments_digHAO

a SpatialPolygonsDataFrame imported with readShapePoly, data covered by the digital version of the hydrological atlas of austria

lonlat

a numeric vector of length 2 with the longitue and latitude of a mappoint

proj4string

the proj4string of the provided lonlat

make.plot

logic

rivers_digHAO

a SpatialLinesDataFrame imported with readShapeLines, data covered by the digital version of the hydrological atlas of austria

...

additional plotting arguments such as plot title etc.

Value

a list with index values as first and HYDROIDs as second member

References

Fürst, J. (2008): Der digitale Hydrologische Atlas Österreichs. Der Hydrologische Atlas Österreichs: Anwendung in Wasserwirtschaft und Umweltschutz, 1. Juli 2008, Universität für Bodenkultur Wien

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
 path_digHAO <- 'ENTER PATH TO YOUR digHAO DIRECTORY HERE'

 rivers <- maptools::readShapeLines(paste0(path_digHAO,
 '/Shape/Gemeinsam/gew1mio.shp')) # Lambert-projection Austria
 sp::proj4string(rivers) <- sp::CRS("+init=epsg:31287")

 catchments <- maptools::readShapePoly(paste0(path_digHAO,
 '/Shape/1_3/wasserbilanz.shp')) # Lambert-projection Austria
 sp::proj4string(catchments) <- sp::CRS("+init=epsg:31287")

 lonlat <- c(16, 48.5)
 catchment(catchments, lonlat, proj4string = sp::CRS("+init=epsg:4326"),
 make.plot = TRUE, rivers_digHAO = rivers)
 
## End(Not run)

konradmayer/trlboku documentation built on July 3, 2020, 9:49 p.m.