Skip to content

Commit

Permalink
Merge pull request #412 from DOI-USGS/no_check_ring_dir
Browse files Browse the repository at this point in the history
No check ring dir
  • Loading branch information
dblodgett-usgs authored Sep 16, 2024
2 parents 4051bf6 + 461e458 commit 9f612b1
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ importFrom(dplyr,summarize)
importFrom(dplyr,ungroup)
importFrom(fst,metadata_fst)
importFrom(fst,read.fst)
importFrom(graphics,par)
importFrom(httr,GET)
importFrom(httr,POST)
importFrom(httr,RETRY)
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
nhdplusTools 1.3.1
==========

- no longer check ring direction in `get_nhdplushr()` to avoid very slow run time on some polygon layers.

nhdplusTools 1.3.0
==========

Expand Down
2 changes: 1 addition & 1 deletion R/get_nhdplushr.R
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ get_nhdplushr <- function(hr_dir, out_gpkg = NULL,

for(layer in layers) {
if(!is.null(out_gpkg) && layer %in% layer_names & !overwrite) {
out <- read_sf(out_gpkg, layer)
out <- read_sf(out_gpkg, layer, check_ring_dir = FALSE)
} else {

layer_set <- lapply(gdbs, get_hr_data, layer = layer, ...)
Expand Down
1 change: 1 addition & 0 deletions R/plot_nhdplus.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
#' `sf::st_transform(x, 3857)` prior to adding to the plot.
#'
#' @export
#' @importFrom graphics par
#' @examples
#' \donttest{
#' options("rgdal_show_exportToProj4_warnings"="none")
Expand Down
6 changes: 4 additions & 2 deletions tests/testthat/test_02_subset_extras.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ test_that("by rpu", {

suppressWarnings(sample_flines <- dplyr::left_join(
dplyr::select(sample_flines, COMID, RPUID, TerminalPa,
ArbolateSu, DnHydroseq, Pathlength, FCODE, DnLevelPat),
ArbolateSu, DnHydroseq, Pathlength, FCODE, DnLevelPat,
DnMinorHyd),
prepare_nhdplus(sample_flines,
0, 0, 0, FALSE), by = "COMID"))

Expand All @@ -95,7 +96,8 @@ test_that("big rpu test", {
vaa <- get_vaa(atts = c("comid", "pathlength", "lengthkm",
"hydroseq", "dnhydroseq", "levelpathi",
"rpuid", "vpuid", "fcode", "arbolatesu",
"terminalfl", "terminalpa", "dnlevelpat"))
"terminalfl", "terminalpa", "dnlevelpat",
"dnminorhyd"))


vaa_sub <- dplyr::filter(vaa, vpuid == "17")
Expand Down

0 comments on commit 9f612b1

Please sign in to comment.