Skip to content

Commit

Permalink
Prepare for release, still to document
Browse files Browse the repository at this point in the history
  • Loading branch information
dieghernan committed Apr 9, 2024
1 parent a2e9b2b commit 391b95b
Show file tree
Hide file tree
Showing 17 changed files with 199 additions and 166 deletions.
1 change: 1 addition & 0 deletions .github/workflows/rostemplate-gh-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ jobs:
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE, run_dont_run = TRUE)'
13 changes: 8 additions & 5 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# CatastRo (development version)

- Migrate from **httr** to **httr2** (#44).
- Migrate from **httr** to **httr2** (#44), no visible change for users.
- Improve documentation.

# CatastRo 0.3.0

- `catr_atom_get_address()` returns also the names of the streets (layer
`"ThoroughfareName"` of the `*.gml file`). The new fields are named with the
`"ThoroughfareName"` of the `*.gml` file). The new fields are named with the
prefix `tfname_*`.
- Add a helper function for easy detecting the `cache_dir`:
`catr_detect_cache_dir()`.
Expand All @@ -19,12 +20,12 @@
# CatastRo 0.2.2

- Add **tidyterra** to 'Suggests'.
- Fix #26: Now `catr_get_code_from_coords()` handle `sfc` objects.
- Now `catr_get_code_from_coords()` handle `sfc` objects (#26).
- `catr_clear_cache()` now has `config = FALSE` ad default parameter.

# CatastRo 0.2.1

- Fix CRAN tests.
- Fix **CRAN** tests.

# CatastRo 0.2.0

Expand Down Expand Up @@ -52,7 +53,9 @@
- `catr_ovc_get_rccoor_distancia()` replaces `near_rc()`.
- `catr_ovc_get_rccoor()` replaces `get_rc()`.
- `catr_ovc_get_cpmrc()` replaces `get_coor()`.
- Add precomputed vignettes.
- Add
[pre-computed](https://ropensci.org/blog/2019/12/08/precompute-vignettes/)
vignettes.

# CatastRo 0.1.0

Expand Down
31 changes: 24 additions & 7 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
#'
#' @description
#' A [`tibble`][tibble::tibble] including the valid SRS (also known as CRS)
#' values that may be used on each API service.
#' values that may be used on each API service. The values are provided
#' as [EPSG
#' codes](https://en.wikipedia.org/wiki/EPSG_Geodetic_Parameter_Dataset).
#'
#' @references
#'
Expand All @@ -33,7 +35,9 @@
#' and columns:
#' \describe{
#' \item{SRS}{Spatial Reference System (CRS) value, identified by the
#' corresponding EPSG code.}
#' corresponding
#' [EPSG][https://en.wikipedia.org/wiki/EPSG_Geodetic_Parameter_Dataset]
#' code.}
#' \item{Description}{Description of the SRS/EPSG code.}
#' \item{ovc_service}{Logical. Is this code valid on OVC services?}
#' \item{wfs_service}{Logical. Is this code valid on INSPIRE WFS services?}
Expand All @@ -43,14 +47,16 @@
#' ```{r, echo=FALSE}
#'
#' tb <- CatastRo::catr_srs_values
#'
#' knitr::kable(tb)
#'
#' for(i in seq_len(ncol(tb))){
#' tb[,i] <- as.vector(paste0("`", tb[[i]], "`"))
#' }
#' nm <- paste0("**", names(tb), "**")
#' knitr::kable(tb, col.names = nm, caption = "Content of [catr_srs_values]")
#'
#' ```
#'
#' @examples
#' data(catr_srs_values)
#' data("catr_srs_values")
#'
#' # OVC valid codes
#' library(dplyr)
Expand All @@ -59,5 +65,16 @@
#'
#' # WFS valid codes
#'
#' catr_srs_values %>% filter(ovc_service == TRUE)
#' catr_srs_values %>% filter(wfs_service == TRUE)
#'
#' # Use with sf::st_crs()
#'
#' catr_srs_values %>%
#' filter(wfs_service == TRUE & ovc_service == TRUE) %>%
#' print() %>%
#' # First value
#' slice_head(n = 1) %>%
#' pull(SRS) %>%
#' # As crs
#' sf::st_crs(.)
NULL
11 changes: 6 additions & 5 deletions R/wms_all.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,17 @@
#' @param what Layer to be extracted, see **Details**.
#' @param styles Style of the WMS layer. See **Details**.
#'
#' @return A `SpatRaster` is returned, with 3 (RGB) or 4 (RGBA) layers. See
#' [terra::rast()].
#' @return
#' A [`SpatRaster`][terra::rast] is returned, with 3 (RGB) or 4 (RGBA) layers,
#' see [terra::RGB()].
#'
#' @family INSPIRE
#' @family WMS
#' @family spatial
#'
#' @seealso [mapSpain::esp_getTiles()]
#' [tidyterra::geom_spatraster_rgb()],
#' [terra::plotRGB()].
#' @seealso
#' [mapSpain::esp_getTiles()] and [terra::RGB()]. For plotting see
#' [terra::plotRGB()] and [tidyterra::geom_spatraster_rgb()].
#'
#' @export
#'
Expand Down
6 changes: 5 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,13 @@ These functions return spatial object (on the formats provided by the **sf** or
INSPIRE](https://www.catastro.minhap.es/webinspire/index.html) service.

Note that the coverage of this service is 95% of the Spanish territory,
[excluding Basque Country and Navarre]{.underline} that have their own
[excluding Basque Country and Navarre[^1]]{.underline} that have their own
independent cadastral offices.

[^1]: The package [**CatastRoNav**](https://ropenspain.github.io/CatastRoNav/)
provides access to the [Cadastre of Navarre](#0), with similar
functionalities than **CatastRo**.

There are three types of functions, each one querying a different service:

#### ATOM service
Expand Down
4 changes: 2 additions & 2 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"name": "R",
"url": "https://r-project.org"
},
"runtimePlatform": "R version 4.3.3 (2024-02-29 ucrt)",
"runtimePlatform": "R version 4.3.3 (2024-02-29)",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
Expand Down Expand Up @@ -271,7 +271,7 @@
},
"SystemRequirements": null
},
"fileSize": "863.066KB",
"fileSize": "857.673KB",
"citation": [
{
"@type": "SoftwareSourceCode",
Expand Down
Binary file modified data/catr_srs_values.rda
Binary file not shown.
2 changes: 1 addition & 1 deletion inst/schemaorg.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"runtimePlatform": "R version 4.3.3 (2024-02-29 ucrt)",
"runtimePlatform": "R version 4.3.3 (2024-02-29)",
"version": "0.3.0.9000"
},
{
Expand Down
58 changes: 36 additions & 22 deletions man/catr_srs_values.Rd

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

9 changes: 4 additions & 5 deletions man/catr_wms_get_layer.Rd

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

Binary file modified man/figures/README-atom-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-wms-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 6 additions & 4 deletions pkgdown/_pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,22 @@ authors:
reference:
- title: ATOM INSPIRE API
desc: >
These functions return <a href="https://r-spatial.github.io/sf/reference/sf.html"
class="external-link"><span class="pkg">sf</span></a> objects as provided
These functions return <a href="https://r-spatial.github.io/sf/reference/sf.html"
class="external-link"><span class="pkg">sf</span></a> objects as provided
by the INSPIRE ATOM services of the Spanish Cadastre.
contents:
- has_concept("ATOM")
- title: WFS INSPIRE API
desc: >
These functions return <a href="https://r-spatial.github.io/sf/reference/sf.html"
class="external-link"><span class="pkg">sf</span></a> objects as provided
class="external-link"><span class="pkg">sf</span></a> objects as provided
by the INSPIRE WFS services of the Spanish Cadastre.
contents:
- has_concept("WFS")
- title: WMS INSPIRE API
desc: These functions return `SpatRaster` objects.
desc: >
These functions return <code><a href="https://rspatial.github.io/terra/reference/rast.html"
class="external-link">SpatRaster</a></code> objects.
contents:
- has_concept("WMS")
- mapSpain::esp_getTiles()
Expand Down
Loading

0 comments on commit 391b95b

Please sign in to comment.