bb_stationid: Extract primary basin ID for one or multiple gauging stations

View source: R/bb_stationid.R

bb_stationidR Documentation

Extract primary basin ID for one or multiple gauging stations

Description

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

Usage

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

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.

Value

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

Examples

# will follow

modche/basinbindr documentation built on Feb. 4, 2023, 10:35 p.m.