| gadm_spatial | R Documentation |
Download and read GADM boundaries without depending on geodata.
gadm_spatial(country = "ESP",
level = 2, path = tools::R_user_dir("basifoR",
"cache"), ext = c("json",
"gpkg"), version = "4.1",
quiet = TRUE)
country |
ISO3 |
level |
Administrative |
path |
Cache directory used to store downloaded GADM files. |
ext |
GADM file format. The default
|
version |
GADM |
quiet |
Passed to |
This helper downloads GADM directly from the public GADM
distribution endpoint, caches the file in path, and
reads it with sf. It is intended as an optional
cartographic support layer for plotting and spatial quality
checks. GADM boundaries are not Spanish NFI products and should
not be interpreted as official inventory geometries.
An sf object containing the requested GADM administrative
boundary layer. Attributes record country, level, version, and URL.
Wilson Lara [aut, cre] (ORCID: <https://orcid.org/0000-0003-3527-1380>), Cristobal Ordonez [aut] (ORCID: <https://orcid.org/0000-0001-5354-3760>), Aitor Vázquez-Veloso [aut] (ORCID: <https://orcid.org/0000-0003-0227-506X>), Felipe Bravo [aut] (ORCID: <https://orcid.org/0000-0001-7348-6695>)
readNFI_spatial, getNFIboundary_spatial
if (interactive()) {
adm <- gadm_spatial("ESP", level = 2, path = tempdir())
plot(sf::st_geometry(adm))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.