Learn R Programming

nhdplusTools (version 0.3.8)

get_nldi_basin: Get NLDI Basin Boundary

Description

Get a basin boundary for a given NLDI feature.

Usage

get_nldi_basin(nldi_feature, tier = "prod")

Arguments

nldi_feature

list with names `featureSource` and `featureID` where `featureSource` is derived from the "source" column of the response of discover_nldi_sources() and the `featureSource` is a known identifier from the specified `featureSource`.

tier

character optional "prod" or "test"

Value

sf data.frame with result basin boundary

Details

Only resolves to the nearest NHDPlus catchment divide. See: https://owi.usgs.gov/blog/nldi-intro/ for more info on the nldi.

Examples

Run this code
# NOT RUN {
library(sf)
library(dplyr)

nldi_nwis <- list(featureSource = "nwissite", featureID = "USGS-05428500")

basin <- get_nldi_basin(nldi_feature = nldi_nwis)

basin %>%
 st_geometry() %>%
 plot()

basin
# }

Run the code above in your browser using DataLab