Skip to content

Commit

Permalink
cran submission commit for next release
Browse files Browse the repository at this point in the history
  • Loading branch information
dblodgett-usgs committed Sep 14, 2022
1 parent 623cb93 commit 509833d
Show file tree
Hide file tree
Showing 15 changed files with 59 additions and 18 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ pkgdown
.github
Dockerfile
data-raw
.dockerignore
9 changes: 9 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.git
.github
pkgdown
docs
data-raw
rosm.cache
.Renviron
.Rproj.user
.Rhistory
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
nhdplusTools 0.5.7
==========

- Update reference for updated flowline attributes.
- Fix failing example for cran checks.

nhdplusTools 0.5.6
==========

Expand Down
4 changes: 4 additions & 0 deletions R/get_nldi.R
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,12 @@ get_nldi_characteristics <- function(nldi_feature, type="local") {
#' \donttest{
#' index <- get_nldi_index(c(-89.276, 42.988))
#'
#' if(inherits(index, "sf")) {
#'
#' plot_nhdplus(bbox = sf::st_bbox(sf::st_buffer(index[1,], units::set_units(1000, "m"))))
#' plot(sf::st_geometry(sf::st_transform(index, 3857)), add = TRUE)
#'
#' }
#' }
get_nldi_index <- function(location) {

Expand Down
16 changes: 13 additions & 3 deletions R/get_oaproc.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#'
#' (trace <- get_raindrop_trace(point))
#'
#' if(inherits(trace, "sf")) {
#' bbox <- sf::st_bbox(trace) + c(-0.005, -0.005, 0.005, 0.005)
#'
#' nhdplusTools::plot_nhdplus(bbox = bbox, cache_data = FALSE)
Expand All @@ -23,6 +24,7 @@
#' plot(sf::st_transform(sf::st_geometry(trace)[1], 3857), add = TRUE, col = "red")
#' plot(sf::st_transform(sf::st_geometry(trace)[2], 3857), add = TRUE, col = "black")
#' }
#' }
#'
get_raindrop_trace <- function(point, direction = "down") {

Expand Down Expand Up @@ -58,6 +60,8 @@ get_raindrop_trace <- function(point, direction = "down") {
#'
#' trace <- get_raindrop_trace(point)
#'
#' if(inherits(trace, "sf")) {
#'
#' (snap_point <- sf::st_sfc(sf::st_point(trace$intersection_point[[1]]),
#' crs = 4326))
#'
Expand Down Expand Up @@ -92,6 +96,7 @@ get_raindrop_trace <- function(point, direction = "down") {
#' plot(sf::st_transform(sf::st_geometry(catchment)[1], 3857), add = TRUE, col = "red")
#' plot(sf::st_transform(sf::st_geometry(catchment)[2], 3857), add = TRUE, col = "black")
#' plot(sf::st_transform(sf::st_sfc(pour_point, crs = 4326), 3857), add = TRUE, col = "white")
#' }
#'}
#'
get_split_catchment <- function(point, upstream = TRUE) {
Expand Down Expand Up @@ -122,6 +127,8 @@ get_split_catchment <- function(point, upstream = TRUE) {
#'
#' (xs <- get_xs_point(point, 300, 100))
#'
#' if(inherits(xs, "sf")) {
#'
#' bbox <- sf::st_bbox(xs) + c(-0.005, -0.005, 0.005, 0.005)
#'
#' nhdplusTools::plot_nhdplus(bbox = bbox, cache_data = FALSE)
Expand All @@ -130,7 +137,7 @@ get_split_catchment <- function(point, upstream = TRUE) {
#' plot(sf::st_transform(sf::st_sfc(point, crs = 4326), 3857), add = TRUE)
#'
#' plot(xs$distance_m, xs$elevation_m)
#'
#' }
#' }
#'
get_xs_point <- function(point, width, num_pts) {
Expand Down Expand Up @@ -163,6 +170,8 @@ get_xs_point <- function(point, width, num_pts) {
#'
#' (xs <- get_xs_points(point1, point2, 100))
#'
#' if(inherits(xs, "sf")) {
#'
#' bbox <- sf::st_bbox(xs) + c(-0.005, -0.005, 0.005, 0.005)
#'
#' nhdplusTools::plot_nhdplus(bbox = bbox, cache_data = FALSE)
Expand All @@ -172,7 +181,7 @@ get_xs_point <- function(point, width, num_pts) {
#' plot(sf::st_transform(sf::st_sfc(point2, crs = 4326), 3857), add = TRUE)
#'
#' plot(xs$distance_m, xs$elevation_m)
#'
#' }
#' }
#'
get_xs_points <- function(point1, point2, num_pts, res = 1) {
Expand Down Expand Up @@ -220,7 +229,8 @@ check_res <- function(res) {
#'
#' (xs <- get_elev_along_path(points, 100))
#'
#' if(!is.null(xs)) {
#' if(inherits(xs, "sf")) {
#'
#' bbox <- sf::st_bbox(xs) + c(-0.005, -0.005, 0.005, 0.005)
#'
#' nhdplusTools::plot_nhdplus(bbox = bbox, cache_data = FALSE)
Expand Down
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,17 +205,12 @@ Other notes:
- this package uses pkgdown. Running `pkgdown::build_site()` will refresh it.

## Disclaimer

This information is preliminary or provisional and is subject to revision. It is being provided to meet the need for timely best science. The information has not received final approval by the U.S. Geological Survey (USGS) and is provided on the condition that neither the USGS nor the U.S. Government shall be held liable for any damages resulting from the authorized or unauthorized use of the information.
This software has been approved for release by the U.S. Geological Survey (USGS). Although the software has been subjected to rigorous review, the USGS reserves the right to update the software as needed pursuant to further analysis and review. No warranty, expressed or implied, is made by the USGS or the U.S. Government as to the functionality of the software and related material nor shall the fact of release constitute any such warranty. Furthermore, the software is released on condition that neither the USGS nor the U.S. Government shall be held liable for any damages resulting from its authorized or unauthorized use.

From: https://www2.usgs.gov/fsp/fsp_disclaimers.asp#5

This software is in the public domain because it contains materials that originally came from the U.S. Geological Survey, an agency of the United States Department of Interior. For more information, see the [official USGS copyright policy](https://www.usgs.gov/information-policies-and-instructions/copyrights-and-credits "official USGS copyright policy")

Although this software program has been used by the USGS, no warranty, expressed or implied, is made by the USGS or the U.S. Government as to the accuracy and functioning of the program and related program material nor shall the fact of distribution constitute any such warranty, and no responsibility is assumed by the USGS in connection therewith.
This software is provided "AS IS."


[
![CC0](https://i.creativecommons.org/p/zero/1.0/88x31.png)
](https://creativecommons.org/publicdomain/zero/1.0/)
10 changes: 5 additions & 5 deletions code.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
"name": "nhdplusTools",
"organization": "U.S. Geological Survey",
"description": "Tools for Using NHDPlus Data",
"version": "0.5.6",
"version": "0.5.7",
"status": "Production",

"permissions": {
"usageType": "openSource",
"licenses": [
{
"name": "Public Domain, CC0-1.0",
"URL": "https://code.usgs.gov/water/nhdplusTools/-/blob/v0.5.6/LICENSE"
"URL": "https://code.usgs.gov/water/nhdplusTools/-/blob/v0.5.7/LICENSE"
}
]
},

"homepageURL": "https://code.usgs.gov/water/nhdplusTools/",
"downloadURL": "https://code.usgs.gov/water/nhdplusTools/-/archive/v0.5.6/nhdplusTools-v0.5.6.zip",
"disclaimerURL": "https://code.usgs.gov/water/nhdplusTools/-/blob/v0.5.6/DISCLAIMER.md",
"downloadURL": "https://code.usgs.gov/water/nhdplusTools/-/archive/v0.5.7/nhdplusTools-v0.5.7.zip",
"disclaimerURL": "https://code.usgs.gov/water/nhdplusTools/-/blob/v0.5.7/DISCLAIMER.md",
"repositoryURL": "https://code.usgs.gov/water/nhdplusTools.git",
"vcs": "git",

Expand All @@ -41,7 +41,7 @@
},

"date": {
"metadataLastUpdated": "2022-08-06"
"metadataLastUpdated": "2022-09-10"
}
}
]
2 changes: 1 addition & 1 deletion inst/CITATION
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ bibentry(bibtype = "Manual",
title = "nhdplusTools: Tools for Accessing and Working with the NHDPlus",
publisher = "U.S. Geological Survey",
address="Reston, VA",
version = "0.5.6",
version = "0.5.7",
institution = "U.S. Geological Survey",
year = 2022,
url = "https://doi.org/10.5066/P97AS8JD",
Expand Down
3 changes: 2 additions & 1 deletion man/get_elev_along_path.Rd

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

4 changes: 4 additions & 0 deletions man/get_nldi_index.Rd

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

2 changes: 2 additions & 0 deletions man/get_raindrop_trace.Rd

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

3 changes: 3 additions & 0 deletions man/get_split_catchment.Rd

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

4 changes: 3 additions & 1 deletion man/get_xs_point.Rd

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

4 changes: 3 additions & 1 deletion man/get_xs_points.Rd

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

2 changes: 2 additions & 0 deletions tests/testthat/test_01_get_nldi.R
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ test_that("xs", {

skip_on_cran()

skip("service down")

point <- sf::st_sfc(sf::st_point(x = c(-105.97218, 36.17592)), crs = 4326)

xs <- get_xs_point(point, 300, 100)
Expand Down

0 comments on commit 509833d

Please sign in to comment.