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.
Value
A list object (`con`) containing two items: - `raster`: HWSDv2 raster object for spatial queries. - `sqlite`: Connection to the HWSDv2 SQLite database.
Author
Khaled Al-Shamaa (k.el-shamaa@cgiar.org)
Examples
if (interactive()) {
hwsd2 <- ini_hwsd2(data_path = 'C:/Users/Kel-shamaa/Downloads/HWSD v2/')
}
