Skip to content

Commit

Permalink
fixes #154
Browse files Browse the repository at this point in the history
  • Loading branch information
dblodgett-usgs committed Aug 29, 2020
1 parent 98ef93e commit d51c1ff
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
nhdplusTools 0.3.15
==========
* Added `discover_nldi_characteristics()` and `get_nldi_characteristics()`
* Changed `navigate_nldi()` to use the new NLDI navigation end point. Distance is now required.
* Fixed a bug in `get_flowline_index()` to handle multipart lines.
* Added flowline_only input to `plot_nhdplus()` to improve scalability
* Added streamorder filtering to `subset_nhdplus()` for download filtering.
Expand Down
9 changes: 5 additions & 4 deletions R/get_nldi.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ discover_nldi_navigation <- function(nldi_feature, tier = "prod") {

query <- paste(nldi_feature[["featureSource"]],
nldi_feature[["featureID"]],
"navigate", sep = "/")
"navigation", sep = "/")

query_nldi(query, tier)
}
Expand Down Expand Up @@ -129,7 +129,7 @@ type_check <- function(type) {
#' }
#'
navigate_nldi <- function(nldi_feature, mode = "upstreamMain",
data_source = "flowline", distance_km = NULL,
data_source = "flowlines", distance_km = 10,
tier = "prod") {

nldi_feature <- check_nldi_feature(nldi_feature)
Expand All @@ -147,11 +147,12 @@ navigate_nldi <- function(nldi_feature, mode = "upstreamMain",
}
}

if(data_source == "flowline") data_source <- ""
# For backward compatibility
if(data_source == "flowline") data_source <- "flowlines"

query <- paste(nldi_feature[["featureSource"]],
nldi_feature[["featureID"]],
"navigate", mode, data_source,
"navigation", mode, data_source,
sep = "/")

if (!is.null(distance_km)) {
Expand Down
4 changes: 2 additions & 2 deletions man/navigate_nldi.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d51c1ff

Please sign in to comment.