queryFlowlines: Download NHDPlus flow lines

View source: R/queryFlowlines.R

queryFlowlinesR Documentation

Download NHDPlus flow lines

Description

Download a subset of the NHDPlus v2.1 flowlines that covers a list of detection sites.

Usage

queryFlowlines(
  sites_sf = NULL,
  root_site_code = NULL,
  min_strm_order = 0,
  dwnstrm_sites = FALSE,
  dwn_min_stream_order_diff = NULL,
  buffer_dist = 0
)

Arguments

sites_sf

An 'sf' class object containing points of all detection sites. Must contain a column named 'site_code' containing the site code of each site.

root_site_code

Site code for the starting detection site.

min_strm_order

minimum stream order to query flowlines for. Default value is '0'.

dwn_min_stream_order_diff

Used to control the minimum stream order of downloaded downstream flowlines. This can be useful if the user wants to prevent downloading excessive smaller streams downstream of a tagging or release location. It corresponds to the difference between the stream order of the 'root_site_code' site and the minimum stream order desired in the downstream flowlines. For example, if the 'root_site_code' is located on a stream order 6 and 'dwn_min_stream_order_diff = 2', then only flowlines of at least 6-2=**4** will be downloaded. The default value is 0, meaning only streams of equal or greater order than the tagging or release site will be returned.

buffer_dist

when querying flowlines downstream of 'root_site_code', how big a buffer should be used around all sites in 'sites_sf' to capture all the flowlines? Default is '0'. See '?sf::st_buffer()' for more help with possible formats.

dwnstream_sites

Does 'sites_sf' contain sites that are downstream of 'root_site_code'? If 'TRUE', then all flowlines within a boundary box of 'sites_df' will be downloaded

Value

sf

Author(s)

Kevin See


KevinSee/PITcleanr documentation built on Feb. 27, 2024, 11:03 p.m.