catr_wfs_get_buildings: WFS INSPIRE: Download buildings

catr_wfs_get_buildings_bboxR Documentation

WFS INSPIRE: Download buildings

Description

Get the spatial data of buildings. The WFS Service allows performing two types of queries:

  • By bounding box: Implemented on catr_wfs_get_buildings_bbox(). Extract objects included in the bounding box provided. See Bounding box.

  • By cadastral reference: Implemented on catr_wfs_get_buildings_rc(). Extract objects of specific cadastral references.

Usage

catr_wfs_get_buildings_bbox(
  x,
  what = c("building", "buildingpart", "other"),
  srs = NULL,
  verbose = FALSE
)

catr_wfs_get_buildings_rc(
  rc,
  what = c("building", "buildingpart", "other"),
  srs = NULL,
  verbose = FALSE
)

Arguments

x

See Bounding box. It may 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.

what

Information to load. Options are:

  • "building" for buildings.

  • "buildingpart" for parts of a building.

  • "other" for other elements such as swimming pools.

srs

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

verbose

Logical. If TRUE, displays informational messages.

rc

The cadastral reference to be extracted.

Value

A sf object.

API Limits

The API service is limited to a bounding box of 4km2 and a maximum of 5,000 elements.

Bounding box

When x is a numeric vector, make sure that the srs matches the coordinate values. Additionally, the function queries the bounding box on EPSG:25830 - ETRS89 / UTM zone 30N, 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 is used for the query (see sf::st_bbox()).

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

References

API Documentation.

INSPIRE Services for Cadastral Cartography.

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_address_bbox(), catr_wfs_get_parcels_bbox(), catr_wms_get_layer(), inspire_wfs_get()

Other INSPIRE WFS services: catr_srs_values, catr_wfs_get_address_bbox(), catr_wfs_get_parcels_bbox(), inspire_wfs_get()

Other buildings: catr_atom_get_buildings(), catr_atom_get_buildings_db_all()

Other spatial: catr_atom_get_address(), catr_atom_get_buildings(), catr_atom_get_parcels(), catr_wfs_get_address_bbox(), catr_wfs_get_parcels_bbox(), catr_wms_get_layer()

Examples



# Using bbox
building <- catr_wfs_get_buildings_bbox(
  c(
    376550,
    4545424,
    376600,
    4545474
  ),
  srs = 25830
)
library(ggplot2)
ggplot(building) +
  geom_sf() +
  labs(title = "Search using bbox")

# Using rc
rc <- catr_wfs_get_buildings_rc("6656601UL7465N")
library(ggplot2)
ggplot(rc) +
  geom_sf() +
  labs(title = "Search using rc")



CatastRo documentation built on April 27, 2026, 5:07 p.m.