uses the Network Linked Data Index to retrieve and estimated network location for the given point. If not within a grid cell of a flowline, will use a raindrop trace service to find the nearest downslope flowline location.

get_nldi_index(location)

Arguments

location

numeric WGS84 lon/lat pair (X, Y)

Examples

# \donttest{
index <- get_nldi_index(c(-89.276, 42.988))

plot_nhdplus(bbox = sf::st_bbox(sf::st_buffer(index[1,], units::set_units(1000, "m"))))
#> Spherical geometry (s2) switched off
#> although coordinates are longitude/latitude, st_intersects assumes that they are planar
#> Spherical geometry (s2) switched on
#> Spherical geometry (s2) switched off
#> although coordinates are longitude/latitude, st_intersects assumes that they are planar
#> Spherical geometry (s2) switched on
#> Spherical geometry (s2) switched off
#> although coordinates are longitude/latitude, st_intersects assumes that they are planar
#> Spherical geometry (s2) switched on
#> Spherical geometry (s2) switched off
#> although coordinates are longitude/latitude, st_intersects assumes that they are planar
#> Spherical geometry (s2) switched on
#> Spherical geometry (s2) switched off
#> Warning: No nonnetwork features found
#> Spherical geometry (s2) switched on
#> Zoom: 15
#> Map tiles by Carto, under CC BY 3.0. Data by OpenStreetMap, under ODbL.
#> Audotdetect projection: assuming Google Mercator (epsg 3857)
plot(sf::st_geometry(sf::st_transform(index, 3857)), add = TRUE)

# }