Skip to contents

Retrieve spatial cadastral parcel and zoning data through several types of WFS queries:

  • By bounding box: catr_wfs_get_parcels_bbox() retrieves objects included in the provided bounding box. See Bounding box.

  • By zoning: catr_wfs_get_parcels_zoning() retrieves objects for a specific cadastral zone.

  • By cadastral parcel: catr_wfs_get_parcels_parcel() retrieves cadastral parcels for a specific cadastral reference.

  • Neighbor cadastral parcels: catr_wfs_get_parcels_neigh_parcel() retrieves neighboring cadastral parcels for a specific cadastral reference.

  • Cadastral parcels by zoning: catr_wfs_get_parcels_parcel_zoning() retrieves cadastral parcels for a specific cadastral zone.

Usage

catr_wfs_get_parcels_bbox(
  x,
  what = c("parcel", "zoning"),
  srs = NULL,
  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)

Arguments

x

Input defining the query area. See Bounding box. It can be:

  • A numeric vector of length 4 with the coordinates that define the bounding box: c(xmin, ymin, xmax, ymax).

  • An sf or sfc object from sf.

what

Information to load, either "parcel" for cadastral parcels or "zoning" for cadastral zoning.

srs

SRS/CRS to use in the query. To see allowed values, use catr_srs_values, specifically the wfs_service column. See Bounding box.

verbose

Logical. Whether to display informational messages.

cod_zona

Cadastral zone code.

rc

Cadastral reference to retrieve.

Value

An sf object. Returns NULL if the data cannot be retrieved.

API limits

The API service has the following limits:

  • "parcel": Bounding box of 1 km2 and a maximum of 5,000 elements.

  • "zoning": Bounding box of 25 km2 and a maximum of 5,000 elements.

Bounding box

When x is a numeric vector, make sure that srs matches the coordinate values. This function queries the bounding box in EPSG:25830, ETRS89 / UTM zone 30N, to work around a potential API issue.

When x is an sf object, the srs value is ignored. In this case, the bounding box of the sf object is used for the query (see sf::st_bbox()).

The result is always provided in the SRS of the sf object provided as input.

See also

catr_wms_get_layer() downloads a map image using the returned spatial object as its extent (x).

Work with cadastral parcels: catr_atom_get_parcels(), catr_atom_get_parcels_db_all()

Query WFS INSPIRE services: catr_wfs_get_address_bbox(), catr_wfs_get_buildings_bbox(), inspire_wfs_get()

Examples

# \donttest{
cp <- catr_wfs_get_parcels_bbox(
  c(
    233673, 4015968, 233761, 4016008
  ),
  srs = 25830
)

library(ggplot2)

ggplot(cp) +
  geom_sf()

# }