Get the spatial data of cadastral parcels and zones. The WFS Service allows to perform several types of queries:
By bounding box: Implemented on catr_wfs_get_parcels_bbox(). Extract
objects included on the bounding box provided. See Details.
By zoning: Implemented on catr_wfs_get_parcels_zoning(). Extract
objects of a specific cadastral zone.
By cadastral parcel: Implemented on catr_wfs_get_parcels_parcel().
Extract cadastral parcels of a specific cadastral reference.
Neighbor cadastral parcels: Implemented on
catr_wfs_get_parcels_neigh_parcel(). Extract neighbor cadastral parcels
of a specific cadastral reference.
Cadastral parcels by zoning: Implemented on
catr_wfs_get_parcels_parcel_zoning(). Extract cadastral parcels of a
specific cadastral zone.
catr_wfs_get_parcels_bbox(x, what = "parcel", srs, verbose = FALSE)catr_wfs_get_parcels_zoning(cod_zona, srs = NULL, verbose = FALSE)
catr_wfs_get_parcels_parcel(rc, srs = NULL, verbose = FALSE)
catr_wfs_get_parcels_neigh_parcel(rc, srs = NULL, verbose = FALSE)
catr_wfs_get_parcels_parcel_zoning(cod_zona, srs = NULL, verbose = FALSE)
A sf object.
See Details. It could be:
A numeric vector of length 4 with the coordinates that defines
the bounding box: c(xmin, ymin, xmax, ymax)
A sf/sfc object, as provided by the sf package.
Information to load. It could be "parcel" for cadastral parcels
or "zoning" for cadastral zoning.
SRS/CRS to use on the query. To check the admitted values check
catr_srs_values, specifically the wfs_service column. See Details.
Logical, displays information. Useful for debugging,
default is FALSE.
Cadastral zone code.
The cadastral reference to be extracted.
The API service is limited to the following constrains:
"parcel: Bounding box of 1km2 and a maximum of 500. elements.
"zoning": Bounding box of 25km2 and a maximum of 500 elements.
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:3857 - Web Mercator, to overcome
a potential bug on the API side. 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:3857 (Web Mercator)
and the spatial object is projected back to the SRS of the initial object.
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_wms_get_layer()
Other INSPIRE WFS services:
catr_srs_values,
catr_wfs_get_address_bbox(),
catr_wfs_get_buildings_bbox()
Other parcels:
catr_atom_get_parcels(),
catr_atom_get_parcels_db_all()
Other spatial:
catr_atom_get_address(),
catr_atom_get_buildings(),
catr_atom_get_parcels(),
catr_wfs_get_address_bbox(),
catr_wfs_get_buildings_bbox(),
catr_wms_get_layer()
if (FALSE) { # tolower(Sys.info()[["sysname"]]) != "linux"
# \donttest{
cp <- catr_wfs_get_parcels_bbox(
c(
233673, 4015968, 233761, 4016008
),
srs = 25830
)
library(ggplot2)
ggplot(cp) +
geom_sf()
# }
}
Run the code above in your browser using DataLab