if(require(nhdplusTools)) {
source(system.file("extdata", "sample_flines.R", package = "nhdplusTools"))
indexes <- index_points_to_lines(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)
}
Run the code above in your browser using DataLab