| Title: | Interface to the 'INSPIRE' services of 'Catastro de Navarra' |
|---|---|
| Description: | Access public spatial data available under the 'INSPIRE' directive. Tools for downloading references, buildings and addresses of properties on Navarre (Spain). |
| Authors: | Diego Hernangómez [aut, cre] (ORCID: <https://orcid.org/0000-0001-8457-4658>), Francisco J. Goerlich [ctb] (ORCID: <https://orcid.org/0000-0003-1626-525X>) |
| Maintainer: | Diego Hernangómez <[email protected]> |
| License: | CC BY 4.0 |
| Version: | 0.1.0.9000 |
| Built: | 2026-06-03 13:19:36 UTC |
| Source: | https://github.com/rOpenSpain/CatastRoNav |
Get the spatial data of all the cadastral addresses belonging to a single municipality using the INSPIRE ATOM service.
catrnav_atom_get_address( munic, cache = TRUE, update_cache = FALSE, cache_dir = NULL, verbose = FALSE )catrnav_atom_get_address( munic, cache = TRUE, update_cache = FALSE, cache_dir = NULL, verbose = FALSE )
munic |
Municipality to extract. It can be a part of a string or the cadastral code. See catrnav_atom_get_address_db_all. |
cache |
A logical value indicating whether to use caching. Default is
|
update_cache |
A logical value indicating whether to update the cache.
Default is |
cache_dir |
A path to a cache directory. On missing value the function
stores the cached files in a temporary dir (see |
verbose |
Logical, displays information. Useful for debugging,
default is |
A sf object.
Other ATOM:
catrnav_atom_get_address_db_all(),
catrnav_atom_get_buildings(),
catrnav_atom_get_buildings_db_all(),
catrnav_atom_get_parcels(),
catrnav_atom_get_parcels_db_all()
Other addresses:
catrnav_atom_get_address_db_all()
s <- catrnav_atom_get_address("Tudela") library(ggplot2) ggplot(s) + geom_sf() + labs( title = "Addresses", subtitle = "Tudela" )s <- catrnav_atom_get_address("Tudela") library(ggplot2) ggplot(s) + geom_sf() + labs( title = "Addresses", subtitle = "Tudela" )
Create a database containing the URLs provided in the INSPIRE ATOM service for extracting Addresses.
catrnav_atom_get_address_db_all( cache = TRUE, update_cache = FALSE, cache_dir = NULL, verbose = FALSE )catrnav_atom_get_address_db_all( cache = TRUE, update_cache = FALSE, cache_dir = NULL, verbose = FALSE )
cache |
A logical value indicating whether to use caching. Default is
|
update_cache |
A logical value indicating whether to update the cache.
Default is |
cache_dir |
A path to a cache directory. On missing value the function
stores the cached files in a temporary dir (see |
verbose |
Logical, displays information. Useful for debugging,
default is |
A tibble with the information requested:
munic: Name of the municipality.
url: URL for downloading information of the corresponding municipality.
date: Reference date of the data.
Other ATOM:
catrnav_atom_get_address(),
catrnav_atom_get_buildings(),
catrnav_atom_get_buildings_db_all(),
catrnav_atom_get_parcels(),
catrnav_atom_get_parcels_db_all()
Other addresses:
catrnav_atom_get_address()
catrnav_atom_get_address_db_all()catrnav_atom_get_address_db_all()
Get the spatial data of all the cadastral buildings belonging to a single municipality using the INSPIRE ATOM service.
catrnav_atom_get_buildings( munic, cache = TRUE, update_cache = FALSE, cache_dir = NULL, verbose = FALSE )catrnav_atom_get_buildings( munic, cache = TRUE, update_cache = FALSE, cache_dir = NULL, verbose = FALSE )
munic |
Municipality to extract. It can be a part of a string or the cadastral code. See catrnav_atom_get_buildings_db_all. |
cache |
A logical value indicating whether to use caching. Default is
|
update_cache |
A logical value indicating whether to update the cache.
Default is |
cache_dir |
A path to a cache directory. On missing value the function
stores the cached files in a temporary dir (see |
verbose |
Logical, displays information. Useful for debugging,
default is |
A sf object.
Other ATOM:
catrnav_atom_get_address(),
catrnav_atom_get_address_db_all(),
catrnav_atom_get_buildings_db_all(),
catrnav_atom_get_parcels(),
catrnav_atom_get_parcels_db_all()
Other buildings:
catrnav_atom_get_buildings_db_all()
s <- catrnav_atom_get_buildings("Iruña") library(ggplot2) ggplot(s) + geom_sf() + labs( title = "Buildings", subtitle = "Pamplona / Iruña" )s <- catrnav_atom_get_buildings("Iruña") library(ggplot2) ggplot(s) + geom_sf() + labs( title = "Buildings", subtitle = "Pamplona / Iruña" )
Create a database containing the URLs provided in the INSPIRE ATOM service for extracting Buildings.
catrnav_atom_get_buildings_db_all( cache = TRUE, update_cache = FALSE, cache_dir = NULL, verbose = FALSE )catrnav_atom_get_buildings_db_all( cache = TRUE, update_cache = FALSE, cache_dir = NULL, verbose = FALSE )
cache |
A logical value indicating whether to use caching. Default is
|
update_cache |
A logical value indicating whether to update the cache.
Default is |
cache_dir |
A path to a cache directory. On missing value the function
stores the cached files in a temporary dir (see |
verbose |
Logical, displays information. Useful for debugging,
default is |
A tibble with the information requested:
munic: Name of the municipality.
url: URL for downloading information of the corresponding municipality.
date: Reference date of the data.
Other ATOM:
catrnav_atom_get_address(),
catrnav_atom_get_address_db_all(),
catrnav_atom_get_buildings(),
catrnav_atom_get_parcels(),
catrnav_atom_get_parcels_db_all()
Other buildings:
catrnav_atom_get_buildings()
catrnav_atom_get_buildings_db_all()catrnav_atom_get_buildings_db_all()
Get the spatial data of all the cadastral parcels belonging to a single municipality using the INSPIRE ATOM service.
catrnav_atom_get_parcels( munic, cache = TRUE, update_cache = FALSE, cache_dir = NULL, verbose = FALSE )catrnav_atom_get_parcels( munic, cache = TRUE, update_cache = FALSE, cache_dir = NULL, verbose = FALSE )
munic |
Municipality to extract. It can be a part of a string or the cadastral code. See catrnav_atom_get_parcels_db_all. |
cache |
A logical value indicating whether to use caching. Default is
|
update_cache |
A logical value indicating whether to update the cache.
Default is |
cache_dir |
A path to a cache directory. On missing value the function
stores the cached files in a temporary dir (see |
verbose |
Logical, displays information. Useful for debugging,
default is |
A sf object.
Other ATOM:
catrnav_atom_get_address(),
catrnav_atom_get_address_db_all(),
catrnav_atom_get_buildings(),
catrnav_atom_get_buildings_db_all(),
catrnav_atom_get_parcels_db_all()
Other parcels:
catrnav_atom_get_parcels_db_all(),
catrnav_wfs_get_parcels_bbox()
s <- catrnav_atom_get_parcels("Iruña") library(ggplot2) ggplot(s) + geom_sf() + labs( title = "Cadastral Zoning", subtitle = "Pamplona / Iruña" )s <- catrnav_atom_get_parcels("Iruña") library(ggplot2) ggplot(s) + geom_sf() + labs( title = "Cadastral Zoning", subtitle = "Pamplona / Iruña" )
Create a database containing the URLs provided in the INSPIRE ATOM service for extracting Cadastral Parcels.
catrnav_atom_get_parcels_db_all( cache = TRUE, update_cache = FALSE, cache_dir = NULL, verbose = FALSE )catrnav_atom_get_parcels_db_all( cache = TRUE, update_cache = FALSE, cache_dir = NULL, verbose = FALSE )
cache |
A logical value indicating whether to use caching. Default is
|
update_cache |
A logical value indicating whether to update the cache.
Default is |
cache_dir |
A path to a cache directory. On missing value the function
stores the cached files in a temporary dir (see |
verbose |
Logical, displays information. Useful for debugging,
default is |
A tibble with the information requested:
munic: Name of the municipality.
url: URL for downloading information of the corresponding municipality.
date: Reference date of the data.
Other ATOM:
catrnav_atom_get_address(),
catrnav_atom_get_address_db_all(),
catrnav_atom_get_buildings(),
catrnav_atom_get_buildings_db_all(),
catrnav_atom_get_parcels()
Other parcels:
catrnav_atom_get_parcels(),
catrnav_wfs_get_parcels_bbox()
catrnav_atom_get_parcels_db_all()catrnav_atom_get_parcels_db_all()
Use this function with caution. This function clears your cached data and configuration, specifically:
Deletes the CatastRoNav config directory
(rappdirs::user_config_dir("CatastRoNav", "R")).
Deletes the cache_dir directory.
Deletes the values stored on Sys.getenv("CATASTRONAV_CACHE_DIR").
catrnav_clear_cache(config = FALSE, cached_data = TRUE, verbose = FALSE)catrnav_clear_cache(config = FALSE, cached_data = TRUE, verbose = FALSE)
config |
If |
cached_data |
If |
verbose |
Logical, displays information. Useful for debugging,
default is |
This is an overkill function that is intended to reset your status as if you had never installed or used CatastRoNav.
Invisible. This function is called for its side effects.
Other cache utilities:
catrnav_set_cache_dir()
# Don't run this! It will modify your current state ## Not run: catrnav_clear_cache(verbose = TRUE) ## End(Not run) Sys.getenv("CATASTRONAV_CACHE_DIR")# Don't run this! It will modify your current state ## Not run: catrnav_clear_cache(verbose = TRUE) ## End(Not run) Sys.getenv("CATASTRONAV_CACHE_DIR")
catrnav_set_cache_dir() stores your cache_dir path on your local
machine and makes it available for future sessions.
Alternatively, you can store the cache_dir manually with the following
options:
Run Sys.setenv(CATASTRONAV_CACHE_DIR = "cache_dir"). You must
run this command in each session (similar to install = FALSE).
Write this line in your .Renviron file:
CATASTRONAV_CACHE_DIR = "value_for_cache_dir" (same behavior as
install = TRUE). This stores your cache_dir permanently.
catrnav_detect_cache_dir() detects and returns the path to your current
cache_dir.
catrnav_set_cache_dir( cache_dir, overwrite = FALSE, install = FALSE, verbose = TRUE ) catrnav_detect_cache_dir(...)catrnav_set_cache_dir( cache_dir, overwrite = FALSE, install = FALSE, verbose = TRUE ) catrnav_detect_cache_dir(...)
cache_dir |
A path to a cache directory. On missing value the function
stores the cached files in a temporary dir (see |
overwrite |
If this is set to |
install |
if |
verbose |
Logical, displays information. Useful for debugging,
default is |
... |
Ignored |
catrnav_set_cache_dir() is called for its side effects, and returns an
(invisible) character with the path to your cache_dir.
catrnav_detect_cache_dir() returns the path to the cache_dir used in this
session
Sometimes cached files may be corrupt. In that case, try re-downloading
the data setting update_cache = TRUE.
If you experience any problem on download, try to download the
corresponding file by any other method and save it on your
cache_dir. Use the option verbose = TRUE for debugging the API query.
Other cache utilities:
catrnav_clear_cache()
# Don't run this! It will modify your current state ## Not run: catrnav_set_cache_dir(verbose = TRUE) ## End(Not run) catrnav_detect_cache_dir()# Don't run this! It will modify your current state ## Not run: catrnav_set_cache_dir(verbose = TRUE) ## End(Not run) catrnav_detect_cache_dir()
Get the spatial data of addresses by bounding box.
catrnav_wfs_get_address_bbox(x, srs, verbose = FALSE, count = NULL)catrnav_wfs_get_address_bbox(x, srs, verbose = FALSE, count = NULL)
x |
See Details. It could be:
|
srs |
SRS/CRS to use on the query. See Details. |
verbose |
Logical, displays information and is useful for debugging.
Default is |
count |
integer, indicating the maximum number of features to return.
The default value |
When x is a numeric vector, make sure that the srs matches the coordinate
values. Additionally, when the srs correspond to a geographic reference system
(4326, 4258), the function queries the bounding box on
EPSG:25830 - ETRS89 / UTM zone 30N. The result is
provided always in the SRS provided in srs.
When x is a sf object, the value srs is ignored. The query is
performed using EPSG:25830 (ETRS89 / UTM zone 30N) and
the spatial object is projected back to the SRS of the initial object.
A sf object.
CatastRo::catr_wfs_get_address_bbox()
downtown <- c(-1.646812, 42.814528, -1.638036, 42.820320) ad <- catrnav_wfs_get_address_bbox(downtown, srs = 4326) library(ggplot2) ggplot(ad) + geom_sf()downtown <- c(-1.646812, 42.814528, -1.638036, 42.820320) ad <- catrnav_wfs_get_address_bbox(downtown, srs = 4326) library(ggplot2) ggplot(ad) + geom_sf()
Get the spatial data of buildings by bounding box.
catrnav_wfs_get_buildings_bbox(x, srs, verbose = FALSE, count = NULL)catrnav_wfs_get_buildings_bbox(x, srs, verbose = FALSE, count = NULL)
x |
See Details. It could be:
|
srs |
SRS/CRS to use on the query. See Details. |
verbose |
Logical, displays information and is useful for debugging.
Default is |
count |
integer, indicating the maximum number of features to return.
The default value |
When x is a numeric vector, make sure that the srs matches the coordinate
values. Additionally, when the srs correspond to a geographic reference system
(4326, 4258), the function queries the bounding box on
EPSG:25830 - ETRS89 / UTM zone 30N. The result is
provided always in the SRS provided in srs.
When x is a sf object, the value srs is ignored. The query is
performed using EPSG:25830 (ETRS89 / UTM zone 30N) and
the spatial object is projected back to the SRS of the initial object.
A sf object.
CatastRo::catr_wfs_get_buildings_bbox()
downtown <- c(-1.646812, 42.814528, -1.638036, 42.820320) bu <- catrnav_wfs_get_buildings_bbox(downtown, srs = 4326) library(ggplot2) ggplot(bu) + geom_sf()downtown <- c(-1.646812, 42.814528, -1.638036, 42.820320) bu <- catrnav_wfs_get_buildings_bbox(downtown, srs = 4326) library(ggplot2) ggplot(bu) + geom_sf()
Get the spatial data of cadastral parcels by bounding box.
catrnav_wfs_get_parcels_bbox(x, srs, verbose = FALSE, count = NULL)catrnav_wfs_get_parcels_bbox(x, srs, verbose = FALSE, count = NULL)
x |
See Details. It could be:
|
srs |
SRS/CRS to use on the query. See Details. |
verbose |
Logical, displays information and is useful for debugging.
Default is |
count |
integer, indicating the maximum number of features to return.
The default value |
When x is a numeric vector, make sure that the srs matches the coordinate
values. Additionally, when the srs correspond to a geographic reference system
(4326, 4258), the function queries the bounding box on
EPSG:25830 - ETRS89 / UTM zone 30N. The result is
provided always in the SRS provided in srs.
When x is a sf object, the value srs is ignored. The query is
performed using EPSG:25830 (ETRS89 / UTM zone 30N) and
the spatial object is projected back to the SRS of the initial object.
A sf object.
CatastRo::catr_wfs_get_parcels_bbox()
Other parcels:
catrnav_atom_get_parcels(),
catrnav_atom_get_parcels_db_all()
downtown <- c(-1.646812, 42.814528, -1.638036, 42.820320) cp <- catrnav_wfs_get_parcels_bbox(downtown, srs = 4326) library(ggplot2) ggplot(cp) + geom_sf()downtown <- c(-1.646812, 42.814528, -1.638036, 42.820320) cp <- catrnav_wfs_get_parcels_bbox(downtown, srs = 4326) library(ggplot2) ggplot(cp) + geom_sf()