From e37442564e2478e18abe978c3f6129d4e3cde6d2 Mon Sep 17 00:00:00 2001 From: Jakub Nowosad Date: Tue, 29 Aug 2023 16:56:43 +0200 Subject: [PATCH] adds some suggestions --- .Rbuildignore | 1 + DESCRIPTION | 6 +++--- inst/CITATION | 10 +++++----- tests/testthat/test-get_elev_raster.R | 28 +++++++++++++-------------- 4 files changed, 23 insertions(+), 22 deletions(-) diff --git a/.Rbuildignore b/.Rbuildignore index 730e555..b6268cb 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -27,3 +27,4 @@ bugs/ contributions/ ^TODO.md$ ^LICENSE\.md$ +^\.devcontainer$ diff --git a/DESCRIPTION b/DESCRIPTION index 7c6149d..7cd3f2a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -3,7 +3,7 @@ Title: Access Elevation Data from Various APIs Version: 1.0.0 Authors@R: c(person("Jeffrey", "Hollister", email = "hollister.jeff@epa.gov", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-9254-9740")), - person("Tarak","Shah", role = "ctb"), + person("Tarak", "Shah", role = "ctb"), person("Alec L.", "Robitaille", role = "ctb", comment = c(ORCID = "0000-0002-4706-1762")), person("Marcus W.", "Beck", role = "rev", comment = c(ORCID = "0000-0002-4996-0059")), person("Mike", "Johnson", role = "ctb", comment = c(ORCID = "0000-0002-5288-8350"))) @@ -14,9 +14,9 @@ Description: Several web services are available that provide access to elevation data. This package provides access to many of those services and returns elevation data either as a simple features POINT/MULTIPOINT from point elevation services or as a raster RasterLayer from raster - elevation services. . In future versions, elevatr will drop + elevation services. In future versions, elevatr will drop support for raster Raster Layers and will instead return terra - SpatRaster objects. Currently, the package supports access to the + SpatRaster objects. Currently, the package supports access to the Amazon Web Services Terrain Tiles , the Open Topography Global Datasets API , and the USGS Elevation Point Query Service . diff --git a/inst/CITATION b/inst/CITATION index a2a3918..1633ae7 100644 --- a/inst/CITATION +++ b/inst/CITATION @@ -1,6 +1,6 @@ utils::citHeader("To cite elevatr:") -utils::citEntry(entry = "manual", +bibentry(bibtype = "Manual", author = c(person("Jeffrey", "Hollister", email = "hollister.jeff@epa.gov", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-9254-9740")), person("Tarak","Shah", role = "ctb"), @@ -8,9 +8,9 @@ utils::citEntry(entry = "manual", person("Marcus W.", "Beck", role = "rev", comment = c(ORCID = "0000-0002-4996-0059")), person("Mike", "Johnson", role = "ctb", comment = c(ORCID = "0000-0002-5288-8350"))), title = "elevatr: Access Elevation Data from Various APIs", - year = "2022", - note = "R package version 0.4.2", + year = "2023", + note = "R package version 1.0.0", doi = "10.5281/zenodo.5809645", url = "https://github.com/jhollist/elevatr/", - textVersion = "Hollister, J.W. (2022). elevatr: Access Elevation Data from Various APIs. R package version 0.4.2. https://CRAN.R-project.org/package=elevatr/" -) \ No newline at end of file + textVersion = "Hollister, J.W. (2023). elevatr: Access Elevation Data from Various APIs. R package version 1.0.0. https://CRAN.R-project.org/package=elevatr/" +) diff --git a/tests/testthat/test-get_elev_raster.R b/tests/testthat/test-get_elev_raster.R index 524302d..3b77edf 100644 --- a/tests/testthat/test-get_elev_raster.R +++ b/tests/testthat/test-get_elev_raster.R @@ -67,24 +67,24 @@ test_that("get_elev_raster clip argument works", { expect_true(num_cell_default_spat_rast > num_cell_loc_spat_rast) }) -test_that("get_elev_raster returns correctly from opentopo", { - skip_on_os("solaris") +# test_that("get_elev_raster returns correctly from opentopo", { +# skip_on_os("solaris") - gl1 <- get_elev_raster(locations = sf_sm[3:4,], src = "gl1", neg_to_na = TRUE) - gl1_prj <- get_elev_raster(locations = sf_sm_prj[3:4,], src = "gl1", - clip = "bbox") +# gl1 <- get_elev_raster(locations = sf_sm[3:4,], src = "gl1", neg_to_na = TRUE) +# gl1_prj <- get_elev_raster(locations = sf_sm_prj[3:4,], src = "gl1", +# clip = "bbox") - #class - #expect_is(gl1,"SpatRaster") - #expect_is(gl1_prj,"SpatRaster") - expect_is(gl1,"RasterLayer") - expect_is(gl1_prj,"RasterLayer") +# #class +# #expect_is(gl1,"SpatRaster") +# #expect_is(gl1_prj,"SpatRaster") +# expect_is(gl1,"RasterLayer") +# expect_is(gl1_prj,"RasterLayer") - #project - #expect_equal(st_crs(gl1)$wkt,st_crs(ll_prj)$wkt) - #expect_equal(st_crs(gl1_prj)$wkt,st_crs(aea_prj)$wkt) turn back on after switch to terra +# #project +# #expect_equal(st_crs(gl1)$wkt,st_crs(ll_prj)$wkt) +# #expect_equal(st_crs(gl1_prj)$wkt,st_crs(aea_prj)$wkt) turn back on after switch to terra -}) +# }) test_that("A bad location file errors",{