Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dieghernan committed Dec 16, 2024
1 parent f21ace2 commit dc32a9e
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 60 deletions.
1 change: 0 additions & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ references:
given-names: Diego
email: [email protected]
orcid: https://orcid.org/0000-0001-8457-4658
affiliation: rOpenSpain
year: '2024'
doi: 10.32614/CRAN.package.mapSpain
version: '>= 0.7.0'
Expand Down
24 changes: 2 additions & 22 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ catr_ovc_get_rccoor(

### Extract geometries using the ATOM service

```{r atom}
```{r atom, fig.alt="Extracting buildings in Nava de la Asuncion with the ATOM service"}
bu <- catr_atom_get_buildings("Nava de la Asuncion", to = "Segovia")
Expand All @@ -185,7 +185,7 @@ ggplot(bu) +

### Extract geometries using the WFS service

```{r wfs}
```{r wfs, fig.alt="Extract Leon Cathedral with the WFS service"}
wfs_get_buildings <- catr_wfs_get_buildings_bbox(
c(-5.569, 42.598, -5.564, 42.601),
srs = 4326
Expand All @@ -197,26 +197,6 @@ ggplot(wfs_get_buildings) +
ggtitle("Leon Cathedral, Spain")
```

### Extract maps using the WMS service

```{r wms}
# For tiles better project
wfs_get_buildings_pr <- sf::st_transform(wfs_get_buildings, 25830)
wms_bu <- catr_wms_get_layer(wfs_get_buildings_pr,
srs = 25830,
bbox_expand = 0.2
)
# Map
# Load tidyterra
library(tidyterra)
ggplot() +
geom_spatraster_rgb(data = wms_bu) +
geom_sf(data = wfs_get_buildings_pr, fill = "red", alpha = 0.6)
```

## A note on caching

Some data sets and tiles may have a size larger than 50MB. You can use
Expand Down
26 changes: 2 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ ggplot(bu) +
ggtitle("Nava de la Asunción, Segovia")
```

<img src="man/figures/README-atom-1.png" width="100%" />
<img src="man/figures/README-atom-1.png" alt="Extracting buildings in Nava de la Asuncion with the ATOM service" width="100%" />

### Extract geometries using the WFS service

Expand All @@ -184,29 +184,7 @@ ggplot(wfs_get_buildings) +
ggtitle("Leon Cathedral, Spain")
```

<img src="man/figures/README-wfs-1.png" width="100%" />

### Extract maps using the WMS service

``` r
# For tiles better project

wfs_get_buildings_pr <- sf::st_transform(wfs_get_buildings, 25830)

wms_bu <- catr_wms_get_layer(wfs_get_buildings_pr,
srs = 25830,
bbox_expand = 0.2
)

# Map
# Load tidyterra
library(tidyterra)
ggplot() +
geom_spatraster_rgb(data = wms_bu) +
geom_sf(data = wfs_get_buildings_pr, fill = "red", alpha = 0.6)
```

<img src="man/figures/README-wms-1.png" width="100%" />
<img src="man/figures/README-wfs-1.png" alt="Extract Leon Cathedral with the WFS service" width="100%" />

## A note on caching

Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@
},
"isPartOf": "https://ropenspain.es/",
"keywords": ["catastro", "cran", "cran-r", "gis", "maps", "r", "r-package", "ropenspain", "rstats", "spain", "spatial", "static-tiles"],
"fileSize": "1836.956KB",
"fileSize": "1380.21KB",
"citation": [
{
"@type": "SoftwareSourceCode",
Expand Down
Binary file removed man/figures/README-wms-1.png
Binary file not shown.
15 changes: 7 additions & 8 deletions vignettes/CatastRo.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ corresponding vignette (see `vignette("ovcservice", package = "CatastRo")`).
> *From <https://knowledge-base.inspire.ec.europa.eu/overview_en>*
The implementation of the INSPIRE directive on the Spanish Cadastre (see
[Catastro INSPIRE](https://www.catastro.hacienda.gob.es/webinspire/index.html)) allows
to retrieve spatial objects from the database of the cadastre:
[Catastro INSPIRE](https://www.catastro.hacienda.gob.es/webinspire/index.html))
allows to retrieve spatial objects from the database of the cadastre:

- **Vector objects:** Parcels, addresses, buildings, cadastral zones and more.
These objects are provided by **CatastRo** as `sf` objects as provided by
Expand All @@ -53,8 +53,8 @@ excluding Basque Country and Navarre[^1] that have their own independent
cadastral offices.

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

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

Expand Down Expand Up @@ -157,10 +157,9 @@ city_catr_code <- catr_get_code_from_coords(city)

city_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 GRANA… 18 900 18900 18 087 18087 GRAN… 18 900 18
#> # ℹ 1 more variable: cm <chr>
#> 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 GRANADA 18 900 18900 18 087 18087 GRANADA 18 900 18 87

city_bu <- catr_atom_get_buildings(city_catr_code$catrcode)
```
Expand Down
8 changes: 4 additions & 4 deletions vignettes/CatastRo.Rmd.orig
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ corresponding vignette (see `vignette("ovcservice", package = "CatastRo")`).
> *From <https://knowledge-base.inspire.ec.europa.eu/overview_en>*

The implementation of the INSPIRE directive on the Spanish Cadastre (see
[Catastro INSPIRE](https://www.catastro.hacienda.gob.es/webinspire/index.html)) allows
to retrieve spatial objects from the database of the cadastre:
[Catastro INSPIRE](https://www.catastro.hacienda.gob.es/webinspire/index.html))
allows to retrieve spatial objects from the database of the cadastre:

- **Vector objects:** Parcels, addresses, buildings, cadastral zones and more.
These objects are provided by **CatastRo** as `sf` objects as provided by
Expand All @@ -71,8 +71,8 @@ excluding Basque Country and Navarre[^1] that have their own independent
cadastral offices.

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

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

Expand Down

0 comments on commit dc32a9e

Please sign in to comment.