Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds some suggestions #88

Merged
merged 1 commit into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ bugs/
contributions/
^TODO.md$
^LICENSE\.md$
^\.devcontainer$
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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