Spanish Forest Inventory
fd_inventory_spain.Rd
Download the tables and SIG data from the Spanish Forest Inventory
Usage
fd_inventory_spain(
province,
ifn = 4,
database = "field",
path_metadata = NULL,
quiet = TRUE
)
Arguments
- province
a character string of length 1 with the name of a Spanish province
- ifn
number of Spanish Forest Inventory (from 2 to 4)
- database
the name of the database (either 'field' or 'gis')
- path_metadata
a character string of length 1 with the path to store the metadata of the selected database. The default
path_metadata = NULL
does not download the metadata- quiet
if
TRUE
(the default), suppress status messages, and the progress bar
Details
The IFN2 doesn't have 'gis' data for Asturias, Cantabria and Navarra.
In the future a function to process the data will be added.
See also
metadata_forestdata for a list of possible species
Examples
# \donttest{
# Download MFE50 for Canary Islands
canarias_ifn4_lst <- fd_inventory_spain("Canarias")
#> Error: 'odbcConnectAccess2007' is not an exported object from 'namespace:RODBC'
canarias_ifn3_gis_lst <- fd_inventory_spain("Canarias", ifn = 3, database = "gis")
#> Error in if (!file.exists(dir_unzip)) { old_timeout <- getOption("timeout") on.exit(options(timeout = old_timeout)) options(timeout = max(timeout, getOption("timeout"))) download.file(url = download_url, destfile = dir_zip, quiet = quiet, mode = "wb") try({ unzip(zipfile = dir_zip, exdir = dir_unzip) }, silent = TRUE) if (!file.exists(dir_unzip) || length(list.files(dir_unzip)) == 0) { system(paste("unzip", shQuote(dir_zip), "-d", shQuote(dir_unzip))) } file.remove(dir_zip)}: argument is of length zero
# }