Skip to content

Commit

Permalink
Dev version (#99)
Browse files Browse the repository at this point in the history
* buggy documentation of katastry()

* cran comments for v1.12.2

* purge mapview from examples
  • Loading branch information
jlacko authored Jul 12, 2024
1 parent 18c23d7 commit 10f6787
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 9 deletions.
21 changes: 21 additions & 0 deletions R/katastry.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,27 @@
#'
#' @source © ČÚZK, 2024 <https://vdp.cuzk.cz/>
#'
#' @examples
#'
#' \donttest{
#' library(sf)
#'
#' # which cadastral area of Prague is the smallest?
#' praha <- RCzechia::katastry() |>
#' subset(NAZ_OBEC == "Praha")
#'
#' smallest <- which.min(sf::st_area(praha))
#'
#' plot(st_geometry(RCzechia::obce_polygony() |>
#' subset(NAZ_OBEC == "Praha")))
#'
#' plot(st_geometry(RCzechia::reky("Praha")), col = "navyblue", add = TRUE)
#'
#' # it is Josefov - the former Jewish Ghetto
#' plot(st_geometry(praha[smallest, ]), col = "red", add = TRUE)
#'
#' }
#'
#' @export

katastry <- function() {
Expand Down
17 changes: 8 additions & 9 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
## Test environments
* Ubuntu 22.04.1 LTS, 4.3.1 (2023-06-16) GEOS 3.12.0, GDAL 3.7.2, PROJ 9.3.0 (current)
* Ubuntu 18.04.6 LTS, R version 3.6.3 GEOS 3.6.2, GDAL 2.2.3, PROJ 4.9.3 (lowest supported)
* Ubuntu 22.04.1 LTS, R version 4.4.1 (2024-06-14) GEOS 3.12.0, GDAL 3.7.2, PROJ 9.3.0 (current)

* Ubuntu 22.04.3 LTS, 4.3.1 (2023-06-16) (GitHub Actions)
* Ubuntu 22.04.3 LTS, R Under development (unstable) (2023-10-27 r85420) (GitHub Actions)
* Windows Server 2022 10.0.20348, R version 4.3.1 (2023-06-16 ucrt) (GitHub Actions)
* Mac OS X 12.6.3, R version 4.3.1 (2023-06-16) (GitHub Actions)
* Ubuntu 22.04.3 LTS, R version 4.4.1 (2024-06-14) (GitHub Actions)
* Ubuntu 22.04.3 LTS, R Under development (unstable) (2024-07-07 r86880) (GitHub Actions)
* Windows Server 2022 10.0.20348, R version 4.4.1 (2024-06-14 ucrt) (GitHub Actions)
* Mac OS X 12.6.3, R version 4.4.1 (2024-06-14) (GitHub Actions)

* Windows R version 4.3.1 (2023-06-16 ucrt) (win builder)
* Windows R Under development (unstable) (2023-10-28 r85429 ucrt) (win builder)
* Windows R version 4.2.3 (2023-03-15 ucrt) (win builder)
* Windows R version 4.4.1 (2024-06-14 ucrt) (win builder)
* Windows R Under development (unstable) (2024-07-11 r86890 ucrt) (win builder)
* Windows R version 4.3.3 (2024-02-29 ucrt) (win builder)

## R CMD check results
Status: OK
Expand Down
22 changes: 22 additions & 0 deletions man/katastry.Rd

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

4 changes: 4 additions & 0 deletions tests/testthat/test-1-katastr.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,8 @@ test_that("katastrální území", {
# sloupce se nerozbily...
expect_equal(colnames(katastry()), c("KOD", "NAZEV", "KOD_OBEC", "NAZ_OBEC", "digi", "geometry"))

# území je pokryté
expect_equal(sum(st_area(katastry())), st_area(republika("high")), tolerance = 5/100)


})

0 comments on commit 10f6787

Please sign in to comment.