Skip to content

Commit

Permalink
Merge pull request #88 from Nowosad/main
Browse files Browse the repository at this point in the history
adds some suggestions
  • Loading branch information
jhollist committed Sep 7, 2023
2 parents 2849667 + e374425 commit f39dc33
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 22 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Expand Up @@ -27,3 +27,4 @@ bugs/
contributions/
^TODO.md$
^LICENSE\.md$
^\.devcontainer$
6 changes: 3 additions & 3 deletions DESCRIPTION
Expand Up @@ -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")))
Expand All @@ -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 <https://registry.opendata.aws/terrain-tiles/>,
the Open Topography Global Datasets API <https://opentopography.org/developers/>,
and the USGS Elevation Point Query Service <https://apps.nationalmap.gov/epqs/>.
Expand Down
10 changes: 5 additions & 5 deletions inst/CITATION
@@ -1,16 +1,16 @@
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"),
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"))),
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/"
)
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/"
)
28 changes: 14 additions & 14 deletions tests/testthat/test-get_elev_raster.R
Expand Up @@ -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",{

Expand Down

0 comments on commit f39dc33

Please sign in to comment.