Extract primary basin ID for one or multiple gauging stations. With the primary basin ID the upstream sub-basins are identified.

bb_stationid(stations, germanyshape, debug = FALSE, polygon_col = "polygon_id")

Arguments

stations

data.frame with gauging station(s) with x and y coordinates. See details.

germanyshape

basin shapefile as a sf object; can be generated with bb_readgermanyshape().

debug

boolean; TRUE prints working process

polygon_col

name of primary basin ID column in shapefile, e.g. objectid

Value

Primary basin ID that includes the gauging station. For each line in stations one primary basin ID will be returned.

Details

Stations must be a data.frame with one or more gauging stations (rows) with x (longitude, WGS84) and y (latitude, WGS84) in two columns.

Examples

# will follow