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

Update entry points #54

Merged
merged 2 commits into from
May 20, 2024
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
1 change: 1 addition & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,4 @@ jobs:
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package

4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ message: 'To cite package "CatastRo" in publications use:'
type: software
license: GPL-2.0-only
title: 'CatastRo: Interface to the API ''Sede Electronica Del Catastro'''
version: 0.3.1
version: 0.3.1.9000
doi: 10.5281/zenodo.6044091
abstract: Access public spatial data available under the 'INSPIRE' directive. Tools
for downloading references and addresses of properties, as well as map images.
Expand All @@ -34,7 +34,7 @@ preferred-citation:
email: diego.hernangomezherrero@gmail.com
orcid: https://orcid.org/0000-0001-8457-4658
year: '2024'
version: 0.3.1
version: 0.3.1.9000
url: https://ropenspain.github.io/CatastRo/
doi: 10.5281/zenodo.6044091
abstract: Access public spatial data available under the INSPIRE directive. Tools
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: CatastRo
Title: Interface to the API 'Sede Electronica Del Catastro'
Version: 0.3.1
Version: 0.3.1.9000
Authors@R: c(
person("Ángel", "Delgado Panadero", , "delgadopanadero@gmail.com", role = c("aut", "cph"),
comment = c(ORCID = "0000-0002-8189-9251")),
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# CatastRo (development version)

- Update entry points (#53).

# CatastRo 0.3.1

- Migrate from **httr** to **httr2** (#44), no visible change for users.
Expand Down
4 changes: 2 additions & 2 deletions R/atom_ad_db.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#'
#'
#' @source
#' <https://www.catastro.minhap.es/INSPIRE/CadastralParcels/ES.SDGC.CP.atom.xml>
#' <https://www.catastro.hacienda.gob.es/INSPIRE/Addresses/ES.SDGC.AD.atom.xml>
#'
#'
#' @family INSPIRE
Expand Down Expand Up @@ -58,7 +58,7 @@ catr_atom_get_address_db_all <- function(cache = TRUE,
cache_dir = NULL,
verbose = FALSE) {
api_entry <- paste0(
"https://www.catastro.minhafp.es/INSPIRE/",
"https://www.catastro.hacienda.gob.es/INSPIRE/",
"Addresses/ES.SDGC.AD.atom.xml"
)

Expand Down
4 changes: 2 additions & 2 deletions R/atom_bu_db.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#'
#'
#' @source
#' <https://www.catastro.minhap.es/INSPIRE/CadastralParcels/ES.SDGC.CP.atom.xml>
#' <https://www.catastro.hacienda.gob.es/INSPIRE/buildings/ES.SDGC.BU.atom.xml>
#'
#' @family INSPIRE
#' @family ATOM
Expand Down Expand Up @@ -52,7 +52,7 @@ catr_atom_get_buildings_db_all <- function(cache = TRUE,
cache_dir = NULL,
verbose = FALSE) {
api_entry <- paste0(
"https://www.catastro.minhafp.es/INSPIRE/",
"https://www.catastro.hacienda.gob.es/INSPIRE/",
"buildings/ES.SDGC.BU.atom.xml"
)

Expand Down
4 changes: 2 additions & 2 deletions R/atom_cp_db.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#'
#'
#' @source
#' <https://www.catastro.minhap.es/INSPIRE/CadastralParcels/ES.SDGC.CP.atom.xml>
#' <https://www.catastro.hacienda.gob.es/INSPIRE/CadastralParcels/ES.SDGC.CP.atom.xml>
Dismissed Show dismissed Hide dismissed
#'
#' @family INSPIRE
#' @family ATOM
Expand Down Expand Up @@ -52,7 +52,7 @@ catr_atom_get_parcels_db_all <- function(cache = TRUE,
cache_dir = NULL,
verbose = FALSE) {
api_entry <- paste0(
"https://www.catastro.minhafp.es/INSPIRE/",
"https://www.catastro.hacienda.gob.es/INSPIRE/",
"CadastralParcels/ES.SDGC.CP.atom.xml"
)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ A BibTeX entry for LaTeX users is:
title = {{CatastRo}: Interface to the {API} Sede Electrónica Del Catastro},
author = {Ángel {Delgado Panadero} and Diego Hernangómez},
year = {2024},
version = {0.3.1},
version = {0.3.1.9000},
url = {https://ropenspain.github.io/CatastRo/},
doi = {10.5281/zenodo.6044091},
abstract = {Access public spatial data available under the INSPIRE directive. Tools for downloading references and addresses of properties, as well as map images.},
Expand Down
6 changes: 3 additions & 3 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
"codeRepository": "https://github.com/rOpenSpain/CatastRo",
"issueTracker": "https://github.com/rOpenSpain/CatastRo/issues",
"license": "https://spdx.org/licenses/GPL-2.0",
"version": "0.3.1",
"version": "0.3.1.9000",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
"url": "https://r-project.org"
},
"runtimePlatform": "R version 4.3.3 (2024-02-29 ucrt)",
"runtimePlatform": "R version 4.4.0 (2024-04-24 ucrt)",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
Expand Down Expand Up @@ -271,7 +271,7 @@
},
"SystemRequirements": null
},
"fileSize": "1838.245KB",
"fileSize": "1838.373KB",
"citation": [
{
"@type": "SoftwareSourceCode",
Expand Down
Binary file modified data/catr_srs_values.rda
Binary file not shown.
4 changes: 2 additions & 2 deletions inst/schemaorg.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"runtimePlatform": "R version 4.3.3 (2024-02-29 ucrt)",
"version": "0.3.1"
"runtimePlatform": "R version 4.4.0 (2024-04-24 ucrt)",
"version": "0.3.1.9000"
},
{
"id": "https://doi.org/10.5281/zenodo.6044091",
Expand Down
2 changes: 1 addition & 1 deletion man/catr_atom_get_address_db.Rd

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

2 changes: 1 addition & 1 deletion man/catr_atom_get_buildings_db.Rd

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

2 changes: 1 addition & 1 deletion man/catr_atom_get_parcels_db.Rd

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

15 changes: 9 additions & 6 deletions vignettes/CatastRo.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ We would make use of the **WMS and WFS services** to get different layers in
order to show some of the capabilities of the package:


```r
``` r
# Extract building by bounding box
# Check https://boundingbox.klokantech.com/

Expand Down Expand Up @@ -136,7 +136,7 @@ In first place, we extract the coordinates of the city center of Granada using
**mapSpain**:


```r
``` r
library(dplyr)
library(sf)
library(mapSpain)
Expand All @@ -152,7 +152,7 @@ Granada in the Cadastre, and we would download the buildings with
`catr_atom_get_buildings()`.


```r
``` r
city_catr_code <- catr_get_code_from_coords(city)

city_catr_code
Expand All @@ -161,6 +161,9 @@ city_catr_code
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 GRANA… 18 900 18900 18 087 18087 GRAN… 18 900 18
#> # ℹ 1 more variable: cm <chr>
```

``` r

city_bu <- catr_atom_get_buildings(city_catr_code$catrcode)
```
Expand All @@ -169,7 +172,7 @@ Next step for creating the visualization is to limit the analysis to a circle of
radius 1.5 km around the city center:


```r
``` r
buff <- city %>%
# Adjust CRS to 25830: (Buildings)
st_transform(st_crs(city_bu)) %>%
Expand All @@ -193,7 +196,7 @@ ggplot(dataviz) +
Let's extract now the construction year, available in the column `beginning`:


```r
``` r
# Extract 4 initial positions
year <- substr(dataviz$beginning, 1, 4)

Expand All @@ -214,7 +217,7 @@ visualization. We use here the function `cut()` to create classes for every
decade starting in year 1900:


```r
``` r
dataviz <- dataviz %>%
mutate(year_cat = cut(year,
breaks = c(0, seq(1900, 2030, by = 10)),
Expand Down
12 changes: 6 additions & 6 deletions vignettes/ovcservice.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ and the spatial reference system (`srs`) used to express them. The return is a
including also other information as the address (town street and number).


```r
``` r
result <- catr_ovc_get_rccoor(
lat = 38.6196566583596,
lon = -3.45624183836806,
Expand All @@ -76,7 +76,7 @@ result <- catr_ovc_get_rccoor(
The function accept as a `srs` argument the following values:


```r
``` r
data(catr_srs_values)

# OVC valid codes
Expand Down Expand Up @@ -114,7 +114,7 @@ It is also possible to get all the cadastral references in a square of
`catr_ovc_get_rccoor_distancia()`.


```r
``` r
catr_ovc_get_rccoor_distancia(
lat = 40.96002,
lon = -5.663408,
Expand All @@ -141,7 +141,7 @@ and the town (`municipality`), `catr_ovc_get_cpmrc()` returns its coordinates
number).


```r
``` r
catr_ovc_get_cpmrc(
rc = "13077A01800039",
srs = "4230",
Expand All @@ -167,7 +167,7 @@ argument `province` is needed to be passed. If it is passed a value to the
data.


```r
``` r
catr_ovc_get_cpmrc(
rc = "13077A01800039",
municipality = "SANTA CRUZ DE MUDELA"
Expand All @@ -187,7 +187,7 @@ catr_ovc_get_cpmrc(
When using only `rc` the result is provided as expected:


```r
``` r
# No warning, get the result
catr_ovc_get_cpmrc(rc = "13077A01800039") %>%
knitr::kable()
Expand Down