Skip to contents

Create a database containing the URLs provided in the INSPIRE ATOM service of the Spanish Cadastre for extracting buildings.

  • catr_atom_get_buildings_db_all() provides a top-level table including information on all the territorial offices (except Basque Country and Navarre) listing the municipalities included in each office.

  • catr_atom_get_buildings_db_to() provides a table for the specified territorial office including information for each of the municipalities of that office.

Usage

catr_atom_get_buildings_db_all(
  cache = deprecated(),
  update_cache = FALSE,
  cache_dir = NULL,
  verbose = FALSE
)

catr_atom_get_buildings_db_to(
  to,
  cache = deprecated(),
  update_cache = FALSE,
  cache_dir = NULL,
  verbose = FALSE
)

Arguments

cache

[Deprecated] cache is no longer supported; this function will always cache results.

update_cache

logical. Should the cached file be refreshed? Default is FALSE. When set to TRUE it would force a new download.

cache_dir

A path to a cache directory. On NULL the function would store the cached files on a temporary dir (See base::tempdir()).

verbose

logical. If TRUE displays informational messages.

to

character. Territorial office. Internally uses base::grep() for matching.

Value

A tibble with the information requested.

  • catr_atom_get_buildings_db_all() includes the following fields:

    • territorial_office: Territorial office, corresponding to each province of Spain except the Basque Country and Navarre.

    • url: ATOM URL for the corresponding territorial office.

    • munic: Name of the municipality.

    • date: Reference date of the data. Note that the information from this service is updated twice a year.

  • catr_atom_get_buildings_db_to() includes the following fields:

    • munic: Name of the municipality.

    • url: URL for downloading information of the corresponding municipality.

    • date: Reference date of the data. Note that the information from this service is updated twice a year.

Examples

# \donttest{
catr_atom_get_buildings_db_all()
#> # A tibble: 7,611 × 4
#>    territorial_office             url                  munic date               
#>    <chr>                          <chr>                <chr> <dttm>             
#>  1 Territorial office 02 Albacete http://www.catastro… 0200… 2025-08-08 00:00:00
#>  2 Territorial office 02 Albacete http://www.catastro… 0200… 2025-08-08 00:00:00
#>  3 Territorial office 02 Albacete http://www.catastro… 0200… 2025-08-08 00:00:00
#>  4 Territorial office 02 Albacete http://www.catastro… 0200… 2025-08-08 00:00:00
#>  5 Territorial office 02 Albacete http://www.catastro… 0200… 2025-08-08 00:00:00
#>  6 Territorial office 02 Albacete http://www.catastro… 0200… 2025-08-08 00:00:00
#>  7 Territorial office 02 Albacete http://www.catastro… 0200… 2025-08-08 00:00:00
#>  8 Territorial office 02 Albacete http://www.catastro… 0200… 2025-08-08 00:00:00
#>  9 Territorial office 02 Albacete http://www.catastro… 0201… 2025-08-08 00:00:00
#> 10 Territorial office 02 Albacete http://www.catastro… 0201… 2025-08-08 00:00:00
#> # ℹ 7,601 more rows
# }