navigate_nldi: Navigate NLDI

Description Usage Arguments Value Examples

View source: R/get_nldi.R

Description

Navigate the Network Linked Data Index network.

Usage

1
2
navigate_nldi(nldi_feature, mode = "upstreamMain",
  data_source = "comid", distance_km = NULL, 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'.

mode

character chosen from names, URLs, or url parameters returned by discover_nldi_navigation(nldi_feature). See examples.

data_source

character chosen from "source" column of the response of discover_nldi_sources() or empty string for flowline geometry.

distance_km

numeric distance in km to stop navigating.

tier

character optional "prod" or "test"

Value

sf data.frame with result

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
library(sf)
library(dplyr)

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

navigate_nldi(nldi_feature = nldi_nwis,
              mode = "upstreamTributaries",
              data_source = "") %>%
  st_geometry() %>%
  plot()

navigate_nldi(nldi_feature = nldi_nwis,
              mode = "UM",
              data_source = "") %>%
  st_geometry() %>%
  plot(col = "blue", add = TRUE)



nwissite <- navigate_nldi(nldi_feature = nldi_nwis,
                          mode = "UT",
                          data_source = "nwissite")

st_geometry(nwissite) %>%
  plot(col = "green", add = TRUE)

nwissite

nhdplusTools documentation built on Nov. 7, 2019, 5:08 p.m.