View source: R/esp-get-grid-BDN.R
| esp_get_grid_BDN | R Documentation |
Loads a sf POLYGON object with the geographic grids of
Spain as provided by the Banco de Datos de la Naturaleza (Nature Data Bank),
under the Ministry of Environment (MITECO).
This dataset provides:
esp_get_grid_BDN() extracts country-wide regular grids with resolutions
of 5x5 or 10x10 kilometers (mainland Spain or Canary Islands).
esp_get_grid_BDN_ccaa() extracts 1x1 kilometer resolution grids for
individual Autonomous Communities.
These grids are useful for biodiversity analysis, environmental monitoring, and spatial statistical applications.
esp_get_grid_BDN_ccaa() provides higher-resolution 1x1 kilometer grids
for specific Autonomous Communities, useful for regional analysis with
finer spatial detail.
esp_get_grid_BDN(
resolution = c(10, 5),
type = c("main", "canary"),
update_cache = FALSE,
cache_dir = NULL,
verbose = FALSE
)
esp_get_grid_BDN_ccaa(
ccaa,
update_cache = FALSE,
cache_dir = NULL,
verbose = FALSE
)
resolution |
numeric. Resolution of the grid in kms. Must be one of:
|
type |
character. The geographic scope of the grid:
|
update_cache |
logical. Should the cached file be refreshed? Default
is |
cache_dir |
character string. A path to a cache directory. See
Caching strategies section in |
verbose |
logical. If |
ccaa |
character string. A vector of names and/or codes for Autonomous
Communities. See Details on |
The BDN provides standardized geographic grids for Spain that follow the Nature Data Bank's specifications. The data is maintained via a custom CDN and is regularly updated.
A sf object.
Data sourced from the Banco de Datos de la Naturaleza (BDN) via a custom CDN. See the repository structure: https://github.com/rOpenSpain/mapSpain/tree/sianedata/MTN
For more information about BDN grids and other resources, visit: https://www.miteco.gob.es/es/biodiversidad/servicios/banco-datos-naturaleza/informacion-disponible/bdn-cart-aux-descargas-ccaa.html.
esp_get_ccaa()
Other geographical grids:
esp_get_grid_ESDAC(),
esp_get_grid_MTN()
# Load a 10x10 km grid for mainland Spain
grid <- esp_get_grid_BDN(resolution = 10, type = "main")
# Visualize the grid
library(ggplot2)
ggplot(grid) +
geom_sf(fill = NA, color = "steelblue") +
theme_light() +
labs(title = "BDN Geographic Grid: 10x10 km Spain")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.