Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/bcgov/bcdata
Browse files Browse the repository at this point in the history
  • Loading branch information
ateucher committed Dec 21, 2018
2 parents a2c00dc + 3a0cac1 commit 6b3df6c
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 1 deletion.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ Imports:
utils
Suggests:
knitr,
rmarkdown
rmarkdown,
testthat
VignetteBuilder:
knitr
Encoding: UTF-8
Expand Down
2 changes: 2 additions & 0 deletions R/bcdc-web-services.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,11 @@ bcdc_get_geodata <- function(id = NULL, query = NULL, crs = 3005, ...) {
#'
#'
#' @examples
#' \dontrun{
#' ## So far only works with this layer
#' bbox_coords = "1069159.051186301,1050414.7675306,1074045.5446851396,1054614.0978811644"
#' bcdc_wms("WHSE_FOREST_VEGETATION.VEG_COMP_LYR_R1_POLY", bbox = bbox_coords)
#' }

## TODO: Figure out a better method of determining the bounding box

Expand Down
2 changes: 2 additions & 0 deletions man/bcdc_wms.Rd

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

5 changes: 5 additions & 0 deletions tests/testthat.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
library(testthat)
library(bcdata)
library(sf)

test_check("bcdata")
7 changes: 7 additions & 0 deletions tests/testthat/test-get-geodata.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
context("testing ability of bcdc_get_geodata to retrieve for bcdc")

test_that("bcdc_get_geodata returns an sf object for a valid id", {
bc_airports <- bcdc_get_geodata("bc-airports")
expect_is(bc_airports, "sf")
expect_equal(attr(bc_airports, "sf_column"), "geometry")
})

0 comments on commit 6b3df6c

Please sign in to comment.