Learn R Programming

nhdplusTools (version 1.3.2)

discover_nhdplus_id: Discover NHDPlus ID

Description

Multipurpose function to find a COMID of interest.

Usage

discover_nhdplus_id(point = NULL, nldi_feature = NULL, raindrop = FALSE)

Value

integer COMID or list containing COMID and raindrop trace.

Arguments

point

sfc POINT including crs as created by: sf::st_sfc(sf::st_point(.. ,..), crs)

nldi_feature

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

raindrop

logical if TRUE will call a raindrop trace web service and return will be the same as get_raindrop_trace with direction "none".

Examples

Run this code
# \donttest{
point <- sf::st_sfc(sf::st_point(c(-76.874, 39.482)), crs = 4326)
discover_nhdplus_id(point)

discover_nhdplus_id(point, raindrop = TRUE)

nldi_nwis <- list(featureSource = "nwissite", featureID = "USGS-08279500")
discover_nhdplus_id(nldi_feature = nldi_nwis)
# }

Run the code above in your browser using DataLab