From a371524bfa7b0d2a047404866fc9a32073b2d368 Mon Sep 17 00:00:00 2001 From: David Blodgett Date: Wed, 8 Jan 2020 04:37:04 -0500 Subject: [PATCH] v1.1.9 --- DESCRIPTION | 8 +++++--- NEWS.md | 7 +++++++ R/item_get_wfs.R | 14 ++++---------- R/query_sb_spatial.R | 10 +--------- man/item_get_wfs.Rd | 12 +----------- man/query_sb_spatial.Rd | 9 --------- 6 files changed, 18 insertions(+), 42 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index ccd9288..eca7240 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,10 @@ Package: sbtools Title: USGS ScienceBase Tools -Maintainer: Tim Kern -Version: 1.1.8 -Authors@R: c(person("Tim", "Kern", role=c("cre"), +Maintainer: David Blodgett +Version: 1.1.9 +Authors@R: c(person("David", "Blodgett", role=c("cre"), + email = "dblodgett@usgs.gov"), + person("Tim", "Kern", role=c("aut"), email = "kernt@usgs.gov"), person("Luke", "Winslow", role = c("aut"), email = "lwinslow@usgs.gov"), diff --git a/NEWS.md b/NEWS.md index 10d2d64..86f92b4 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,10 @@ +# Version 1.1.9 (2020-01-07) + +* Fixed travis build and addressed CRAN test failures. +* Deprecated item_get_wfs -- will be removed in a future version. +* Changed maintainer to dblodgett@usgs.gov +* See repository for other updates. + # Version 1.1.3 (2016-08-18) * Fix items_create to properly handle cases creating one item diff --git a/R/item_get_wfs.R b/R/item_get_wfs.R index bf98ae5..80a4465 100644 --- a/R/item_get_wfs.R +++ b/R/item_get_wfs.R @@ -1,4 +1,4 @@ -#' @title Download and load from SB WFS service +#' @title Download and load from SB WFS service (Deprecated) #' #' @template manipulate_item #' @param as_sf boolean, return data in sf format @@ -15,18 +15,12 @@ #' installed with sbtools: \code{sf}, \code{httr}, and \code{xml2}. #' You can install them simply by running \code{install.packages(c("xml2", "httr", "sf"))} #' -#' @examples -#' \donttest{ -#' -#' layer = item_get_wfs('5b4e25a6e4b06a6dd17e4879', as_sf = TRUE) -#' -#' plot(sf::st_geometry(layer), pch = ".") -#' -#' } -#' #' @export +#' item_get_wfs = function(sb_id, as_sf = FALSE, ..., session){ + warning("item_get_wfs is going to be removed in a future version of sbtools") + if(!requireNamespace("httr") || !requireNamespace("sf") || !requireNamespace("xml2")){ stop(' httr, xml2, and sf packages not installed. diff --git a/R/query_sb_spatial.R b/R/query_sb_spatial.R index 964f376..c80f550 100644 --- a/R/query_sb_spatial.R +++ b/R/query_sb_spatial.R @@ -21,16 +21,8 @@ #' query_sb_spatial(bb_wkt="POLYGON((-104.4 41.0,-95.1 41.0,-95.1 37.5,-104.4 37.5,-104.4 41.0))", #' limit=3) #' -#' \donttest{ -#' ###Use the bounding box of an sp object -#' #grab an sp object from a pre-determined ScienceBase Item -#' layer = item_get_wfs('5b4e25a6e4b06a6dd17e4879') -#' -#' #get items in that BB -#' query_sb_spatial(layer) -#' } -#' #' @export +#' query_sb_spatial = function(bbox, long, lat, bb_wkt, ..., limit=20, session=current_session()){ if(!missing(bbox)){ diff --git a/man/item_get_wfs.Rd b/man/item_get_wfs.Rd index 1303eab..48cef0a 100644 --- a/man/item_get_wfs.Rd +++ b/man/item_get_wfs.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/item_get_wfs.R \name{item_get_wfs} \alias{item_get_wfs} -\title{Download and load from SB WFS service} +\title{Download and load from SB WFS service (Deprecated)} \usage{ item_get_wfs(sb_id, as_sf = FALSE, ..., session) } @@ -26,13 +26,3 @@ standardized interface. This requires the following libraries not by default installed with sbtools: \code{sf}, \code{httr}, and \code{xml2}. You can install them simply by running \code{install.packages(c("xml2", "httr", "sf"))} } -\examples{ -\donttest{ - -layer = item_get_wfs('5b4e25a6e4b06a6dd17e4879', as_sf = TRUE) - -plot(sf::st_geometry(layer), pch = ".") - -} - -} diff --git a/man/query_sb_spatial.Rd b/man/query_sb_spatial.Rd index eafab0d..e653203 100644 --- a/man/query_sb_spatial.Rd +++ b/man/query_sb_spatial.Rd @@ -38,13 +38,4 @@ query_sb_spatial(long=c(-104.4, -95.1), lat=c(37.5, 41.0), limit=3) query_sb_spatial(bb_wkt="POLYGON((-104.4 41.0,-95.1 41.0,-95.1 37.5,-104.4 37.5,-104.4 41.0))", limit=3) -\donttest{ -###Use the bounding box of an sp object -#grab an sp object from a pre-determined ScienceBase Item -layer = item_get_wfs('5b4e25a6e4b06a6dd17e4879') - -#get items in that BB -query_sb_spatial(layer) -} - }