Access WFS INSPIRE services. This function is used internally in WFS calls and is exposed for users and developers accessing other cadastral or INSPIRE resources.
Usage
inspire_wfs_get(
scheme = "https",
hostname = "ovc.catastro.meh.es",
path = "INSPIRE/wfsCP.aspx",
query = list(),
verbose = FALSE
)Arguments
- scheme
Character string. Protocol to access the resource on the Internet.
- hostname
Character string. Host that holds the resource.
- path
Character string. Specific resource in the host to access.
- query
Named list. Names and values of arguments for the query.
- verbose
Logical. If
TRUE, displays informational messages.
Value
Character string. Path of the resulting file in the tempfile() folder.
Details
This function is used internally in all the WFS calls. We expose it to make it available to other users and/or developers for accessing other cadastral or INSPIRE resources. See Examples.
See also
Related INSPIRE API functions:
catr_atom_get_address(),
catr_atom_get_address_db_all(),
catr_atom_get_buildings(),
catr_atom_get_buildings_db_all(),
catr_atom_get_parcels(),
catr_atom_get_parcels_db_all(),
catr_wfs_get_address_bbox(),
catr_wfs_get_buildings_bbox(),
catr_wfs_get_parcels_bbox(),
catr_wms_get_layer()
Related WFS INSPIRE functions:
catr_srs_values,
catr_wfs_get_address_bbox(),
catr_wfs_get_buildings_bbox(),
catr_wfs_get_parcels_bbox()
Examples
# Access the Cadastre of Navarra
# Try also https://ropenspain.github.io/CatastRoNav/
file_local <- inspire_wfs_get(
hostname = "inspire.navarra.es",
path = "services/BU/wfs",
query = list(
service = "WFS",
request = "getfeature",
typenames = "BU:Building",
bbox = "609800,4740100,611000,4741300",
SRSNAME = "EPSG:25830"
)
)
#> ✖ HTTP error 400 (Bad Request): <https://inspire.navarra.es/services/BU/wfs?service=WFS&request=getfeature&typenames=BU:Building&bbox=609800,4740100,611000,4741300&srsname=EPSG:25830>.
#> ! If this looks like a package bug, please open an issue at <https://github.com/ropenspain/CatastRo/issues>
#> → Returning "NULL" because the download failed.
if (!is.null(file_local)) {
pamp <- sf::read_sf(file_local)
library(ggplot2)
ggplot(pamp) +
geom_sf()
}
