Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Description: Topotoolboxr provides an R interface to TopoToolbox, a set of tools
Encoding: UTF-8
LazyData: true
URL: https://github.com/TopoToolbox/topotoolboxr, https://github.com/TopoToolbox
RoxygenNote: 7.3.2
RoxygenNote: 7.3.3
Suggests:
testthat (>= 3.1.5)
Config/testthat/edition: 3
19 changes: 19 additions & 0 deletions R/data.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#' Path to 30 m SRTM elevation data for Big Tujunga catchment
#'
#' Character string containing the file path to the 30 m resolution Shuttle Radar
#' Topography Mission (SRTM) elevation data TIFF file for the Big Tujunga
#' catchment in California, located in `inst/extdata/`.
#'
#' @format ## `srtm_bigtujunga30m_utm11`
#' A single length character string giving the full path to the GEOTIFF file:
#' \describe{
#' \item{file}{Path to `srtm_bigtujunga30m_utm11.tif` (643 rows, 1197 columns, 1 layer, WGS 84 / UTM zone 11N EPSG:32611)}
#' }
#' @usage data(srtm_bigtujunga30m_utm11)
#' @examples
#' \dontrun{
#' data(srtm_bigtujunga30m_utm11)
#' library(topotoolboxr)
#' GRIDobj(srtm_bigtujunga30m_utm11)
#' }
"srtm_bigtujunga30m_utm11"
Binary file added data/srtm_bigtujunga30m_utm11.rda
Binary file not shown.
Binary file added inst/extdata/srtm_bigtujunga30m_utm11.tif
Binary file not shown.
29 changes: 29 additions & 0 deletions man/srtm_bigtujunga30m_utm11.Rd

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

7 changes: 7 additions & 0 deletions tests/testthat/test-data.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
test_that("Checks if data path loads correctly", {
srtm_bigtujunga30m_utm11 <- system.file("extdata",
"srtm_bigtujunga30m_utm11.tif",
package = "topotoolboxr")
dem <- GRIDobj(srtm_bigtujunga30m_utm11)
expect_s3_class(dem, "GRIDobj")
})