Skip to content

Commit

Permalink
Prepare for CRAN
Browse files Browse the repository at this point in the history
  • Loading branch information
dieghernan committed Feb 24, 2022
1 parent ca34f74 commit 0015d16
Show file tree
Hide file tree
Showing 46 changed files with 52 additions and 53 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ CRAN-SUBMISSION
.github/pkg.lock
docs/
inst/doc
cran-comments.md
5 changes: 2 additions & 3 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.1.0.9000
version: 0.2.0
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: [email protected]
orcid: https://orcid.org/0000-0001-8457-4658
year: '2022'
version: 0.1.0.9000
version: 0.2.0
url: https://ropenspain.github.io/CatastRo/
doi: 10.5281/zenodo.6044091
abstract: Access public spatial data available under the 'INSPIRE' directive. Tools
Expand Down Expand Up @@ -250,7 +250,6 @@ references:
email: [email protected]
orcid: https://orcid.org/0000-0002-9415-4582
year: '2022'
url: https://CRAN.R-project.org/package=ggspatial
- type: software
title: knitr
abstract: 'knitr: A General-Purpose Package for Dynamic Report Generation in R'
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: CatastRo
Title: Interface to the API 'Sede Electronica Del Catastro'
Version: 0.1.0.9000
Version: 0.2.0
Authors@R: c(
person("Ángel", "Delgado Panadero", , "[email protected]", role = c("aut", "cph"),
comment = c(ORCID = "0000-0002-8189-9251")),
Expand Down
4 changes: 2 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CatastRo (development version)
# CatastRo 0.2.0

- Overall revamp of the package. Major changes on the API.
**Overall revamp of the package. Major changes on the API.**

- Add **ATOM INSPIRE** capabilities:

Expand Down
2 changes: 1 addition & 1 deletion R/atom_ad.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' **ATOM INSPIRE**: Download all the Addresses of a Municipality
#' ATOM INSPIRE: Download all the Addresses of a Municipality
#'
#'
#' Get the spatial data of all the addresses belonging to a single
Expand Down
2 changes: 1 addition & 1 deletion R/atom_ad_db.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' **ATOM INSPIRE**: Reference Database for ATOM Addresses
#' ATOM INSPIRE: Reference Database for ATOM Addresses
#'
#' @description
#'
Expand Down
2 changes: 1 addition & 1 deletion R/atom_bu.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' **ATOM INSPIRE**: Download all the Buildings of a Municipality
#' ATOM INSPIRE: Download all the Buildings of a Municipality
#'
#'
#' Get the spatial data of all the buildings belonging to a single municipality
Expand Down
2 changes: 1 addition & 1 deletion R/atom_bu_db.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' **ATOM INSPIRE**: Reference Database for ATOM Buildings
#' ATOM INSPIRE: Reference Database for ATOM Buildings
#'
#' @description
#'
Expand Down
2 changes: 1 addition & 1 deletion R/atom_cp.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' **ATOM INSPIRE**: Download all the Cadastral Parcels of a Municipality
#' ATOM INSPIRE: Download all the Cadastral Parcels of a Municipality
#'
#'
#' Get the spatial data of all the cadastral parcels belonging to a single
Expand Down
2 changes: 1 addition & 1 deletion R/atom_cp_db.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' **ATOM INSPIRE**: Reference Database for ATOM Cadastral Parcels
#' ATOM INSPIRE: Reference Database for ATOM Cadastral Parcels
#'
#' @description
#'
Expand Down
2 changes: 1 addition & 1 deletion R/atom_search.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' **ATOM INSPIRE**: Search for municipality codes
#' ATOM INSPIRE: Search for municipality codes
#'
#' @description
#' Search for a municipality (as a string, part of string or code) and get
Expand Down
2 changes: 1 addition & 1 deletion R/ovc_cpmrc.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' **OVCCoordenadas**: Geocode a cadastral reference
#' OVCCoordenadas: Geocode a cadastral reference
#'
#' @description
#' Implementation of the OVCCoordenadas service
Expand Down
2 changes: 1 addition & 1 deletion R/ovc_munic.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' **OVCCallejero**: Extract the code of a municipality
#' OVCCallejero: Extract the code of a municipality
#'
#' @description
#' Implementation of the OVCCallejero service
Expand Down
2 changes: 1 addition & 1 deletion R/ovc_provinces.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' **OVCCallejero**: Extract a list of provinces with their codes
#' OVCCallejero: Extract a list of provinces with their codes
#'
#' @description
#' Implementation of the OVCCallejero service
Expand Down
2 changes: 1 addition & 1 deletion R/ovc_rccoor.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' **OVCCoordenadas**: Reverse geocode a cadastral reference
#' OVCCoordenadas: Reverse geocode a cadastral reference
#'
#' @description
#' Implementation of the OVCCoordenadas service
Expand Down
2 changes: 1 addition & 1 deletion R/ovc_rccoor_distancia.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' **OVCCoordenadas**: Reverse geocode cadastral references on a region
#' OVCCoordenadas: Reverse geocode cadastral references on a region
#'
#' @description
#' Implementation of the OVCCoordenadas service
Expand Down
2 changes: 1 addition & 1 deletion R/wfs_ad.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' **WFS INSPIRE**: Download Addresses
#' WFS INSPIRE: Download Addresses
#'
#' @description
#' Get the spatial data of addresses The WFS Service allows to perform
Expand Down
2 changes: 1 addition & 1 deletion R/wfs_bu.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' **WFS INSPIRE**: Download Buildings
#' WFS INSPIRE: Download Buildings
#'
#' @description
#' Get the spatial data of buildings. The WFS Service allows to perform
Expand Down
2 changes: 1 addition & 1 deletion R/wfs_cp.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' **WFS INSPIRE**: Download Cadastral Parcels
#' WFS INSPIRE: Download Cadastral Parcels
#'
#' @description
#' Get the spatial data of cadastral parcels and zones. The WFS Service allows
Expand Down
2 changes: 1 addition & 1 deletion R/wms_all.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' **WMS INSPIRE**: Download map images
#' WMS INSPIRE: Download map images
#'
#' @description
#' Get geotagged images from the Spanish Cadastre. This function is a wrapper of
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ This script highlights some features of **CatastRo** :
library(CatastRo)

catr_ovc_get_cpmrc(rc = "13077A01800039")
#> # A tibble: 1 × 10
#> # A tibble: 1 x 10
#> xcoord ycoord refcat address pc.pc1 pc.pc2 geo.xcen geo.ycen geo.srs ldt
#> <dbl> <dbl> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 -3.46 38.6 13077A018 DS DIS 13077 18000 -3.4575 38.6184 EPSG:4 DS D
#> 1 -3.46 38.6 13077A018~ DS DIS~ 13077~ 18000~ -3.4575~ 38.6184~ EPSG:4~ DS D~
```

### Extract a cadastral reference from a given set of coordinates
Expand All @@ -132,10 +132,10 @@ catr_ovc_get_rccoor(
lon = -3.45624183836806,
srs = "4230"
)
#> # A tibble: 1 × 8
#> # A tibble: 1 x 8
#> refcat address pc.pc1 pc.pc2 geo.xcen geo.ycen geo.srs ldt
#> <chr> <chr> <chr> <chr> <dbl> <dbl> <chr> <chr>
#> 1 13077A01800039 DS DISEMINADO P 13077 18000 -3.46 38.6 EPSG:4 DS D
#> 1 13077A01800039 DS DISEMINADO P~ 13077~ 18000~ -3.46 38.6 EPSG:4~ DS D~
```

### Extract geometries using the ATOM service
Expand Down Expand Up @@ -219,7 +219,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 = {2022},
version = {0.1.0.9000},
version = {0.2.0},
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
4 changes: 2 additions & 2 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"codeRepository": "https://github.com/rOpenSpain/CatastRo",
"issueTracker": "https://github.com/rOpenSpain/CatastRo/issues",
"license": "https://spdx.org/licenses/GPL-2.0",
"version": "0.1.0.9000",
"version": "0.2.0",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down Expand Up @@ -288,7 +288,7 @@
},
"SystemRequirements": null
},
"fileSize": "1381.264KB",
"fileSize": "1389.318KB",
"citation": [
{
"@type": "SoftwareSourceCode",
Expand Down
Binary file modified data/catr_srs_values.rda
Binary file not shown.
2 changes: 1 addition & 1 deletion man/catr_atom_get_address.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_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.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.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.

2 changes: 1 addition & 1 deletion man/catr_atom_search_munic.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_ovc_get_cod_munic.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_ovc_get_cod_provinces.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_ovc_get_cpmrc.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_ovc_get_rccoor.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_ovc_get_rccoor_distancia.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_wfs_get_address.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_wfs_get_buildings.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_wfs_get_parcels.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_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-unnamed-chunk-6-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-unnamed-chunk-7-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-unnamed-chunk-8-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 7 additions & 8 deletions vignettes/CatastRo.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ ggplot() +
geom_sf(data = stadium, fill = "red", alpha = .5)
```

<img src="santbernabeu-1.png" title="plot of chunk santbernabeu" alt="plot of chunk santbernabeu" width="100%" />
<img src="./santbernabeu-1.png" title="plot of chunk santbernabeu" alt="plot of chunk santbernabeu" width="100%" />

### Thematic maps

Expand Down Expand Up @@ -148,11 +148,10 @@ Valencia in the Cadastre, and we would download the buildings with
val_catr_code <- catr_get_code_from_coords(val)

val_catr_code
#> # A tibble: 1 × 12
#> munic catr_to catr_munic catrcode cpro cmun inecode nm cd cmc cp
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 VALEN… 46 900 46900 46 250 46250 VALE… 46 900 46
#> # … with 1 more variable: cm <chr>
#> # A tibble: 1 x 12
#> munic catr_to catr_munic catrcode cpro cmun inecode nm cd cmc cp cm
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 VALENCIA 46 900 46900 46 250 46250 VALENCIA 46 900 46 250

valencia_bu <- catr_atom_get_buildings(val_catr_code$catrcode)
```
Expand All @@ -178,7 +177,7 @@ ggplot(dataviz) +
geom_sf()
```

<img src="minimal-1.png" title="plot of chunk minimal" alt="plot of chunk minimal" width="100%" />
<img src="./minimal-1.png" title="plot of chunk minimal" alt="plot of chunk minimal" width="100%" />

Let's extract now the construction year, available in the column `beginning`:

Expand Down Expand Up @@ -238,7 +237,7 @@ ggplot(dataviz) +
)
```

<img src="dataviz-1.png" title="plot of chunk dataviz" alt="plot of chunk dataviz" width="100%" />
<img src="./dataviz-1.png" title="plot of chunk dataviz" alt="plot of chunk dataviz" width="100%" />



Expand Down
Binary file modified vignettes/dataviz-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 vignettes/minimal-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 vignettes/santbernabeu-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0015d16

Please sign in to comment.