Learn R Programming

QBMS (version 1.5.0)

ini_hwsd2: Download and Setup HWSD v2.0 Data Files to Extract their Data Offline

Description

Downloads and sets up the HWSD v2.0 data files required to extract soil data offline. The function retrieves the HWSD raster soil unit map and the SQLite database containing soil attributes. If the files already exist in the specified directory, they are used directly. The function returns an object with the raster and SQLite connection for further queries.

Usage

ini_hwsd2(data_path = "./data/", timeout = 300)

Value

A list object (`con`) containing two items: - `raster`: HWSDv2 raster object for spatial queries. - `sqlite`: Connection to the HWSDv2 SQLite database.

Arguments

data_path

String specifying the directory path where HWSD v2.0 data files are stored or should be downloaded (default is './data/').

timeout

Timeout in seconds for downloading each HWSD v2.0 data file (default is 300).

Author

Khaled Al-Shamaa, k.el-shamaa@cgiar.org

See Also

get_hwsd2

Examples

Run this code
if (interactive()) {
  hwsd2 <- ini_hwsd2(data_path = 'C:/Users/Kel-shamaa/Downloads/HWSD v2/')
}
 

Run the code above in your browser using DataLab