Get the spatial data of addresses The WFS Service allows to perform several types of queries:
By bounding box: Implemented on
catr_wfs_get_address_bbox()
. Extract objects included on the bounding box provided. See Details.
By street code: Implemented on
catr_wfs_get_address_codvia()
. Extract objects of specific addresses.
By cadastral reference: Implemented on
catr_wfs_get_address_rc()
. Extract objects of specific cadastral references
By postal codes: Implemented on
catr_wfs_get_address_postalcode()
. Extract objects of specific cadastral references
Usage
catr_wfs_get_address_bbox(x, srs, verbose = FALSE)
catr_wfs_get_address_codvia(codvia, del, mun, srs = NULL, verbose = FALSE)
catr_wfs_get_address_rc(rc, srs = NULL, verbose = FALSE)
catr_wfs_get_address_postalcode(postalcode, srs = NULL, verbose = FALSE)
Arguments
- x
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.
- srs
SRS/CRS to use on the query. To check the admitted values check catr_srs_values, specifically the
wfs_service
column. See Details.- verbose
Logical, displays information. Useful for debugging, default is
FALSE
.- codvia
Cadastral street code.
- del
Cadastral office code.
- mun
Cadastral municipality code.
- rc
The cadastral reference to be extracted.
- postalcode
Postal code.
Value
A sf
object.
Details
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.
When x
is a sf
object, the value srs
is ignored. In
this case, the bounding box of the sf
object would be
used for the query (see sf::st_bbox()
). The query is performed using
EPSG:3857 (Web Mercator). The result is provided
always in the SRS of the sf
object provided as input.
See also
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_buildings_bbox()
,
catr_wfs_get_parcels_bbox()
,
catr_wms_get_layer()
Other INSPIRE WFS services:
catr_srs_values
,
catr_wfs_get_buildings_bbox()
,
catr_wfs_get_parcels_bbox()
Other addresses:
catr_atom_get_address()
,
catr_atom_get_address_db_all()
Other spatial:
catr_atom_get_address()
,
catr_atom_get_buildings()
,
catr_atom_get_parcels()
,
catr_wfs_get_buildings_bbox()
,
catr_wfs_get_parcels_bbox()
,
catr_wms_get_layer()