get_hydro_location: get hydro location

Description Usage Arguments Examples

Description

given a flowline index, returns the hydrologic location (point) along the specific linear element referenced by the index.

Usage

1
get_hydro_location(indexes, flowpath)

Arguments

indexes

data.frame as output from get_flowline_index.

flowpath

data.frame with two columns. The first should join to the COMID field of the indexes and the second should be linear geometry.

Examples

1
2
3
4
5
6
7
8
9
source(system.file("extdata", "sample_flines.R", package = "nhdplusTools"))

indexes <- get_flowline_index(sample_flines,
                   sf::st_sfc(sf::st_sfc(list(sf::st_point(c(-76.86934, 39.49328)),
                                              sf::st_point(c(-76.91711, 39.40884)),
                                              sf::st_point(c(-76.88081, 39.36354))),
                              crs = 4326)))

get_hydro_location(indexes, sample_flines)

nhdplusTools documentation built on Aug. 18, 2021, 5:07 p.m.