Queries the HWSD v2 database to retrieve soil information for specific locations based on their coordinates.
For each location, the function extracts the Soil Mapping Unit (SMU) code and retrieves soil attributes based
on the specified sequence (soil dominance) and depth layer. The function returns the input data frame augmented
with soil data from the HWSDv2 dataset.
The HWSD2_SMU table contains general information for each of the soil units
occurring in any given SMU code (dominant soil unit and up to 11 associated soils).
The SEQUENCE column refers to the sequence in which soil units within the SMU
are presented (in order of percentage share). The dominant soil has sequence 1.
The sequence can range between 1 and 12.
The SHARE column refers to the share of the soil unit within the mapping unit in
percentage. Shares of soil units within a mapping unit always sum up to 100 percent.
The HWSD2_LAYERS table provides soil attributes per depth layer for each of the
seven depth layers (D1 to D7) separately (represented in the LAYER column in the
HWSD2_LAYERS table). The depth of the top and bottom of each layer is defined in
the TOPDEP and BOTDEP columns, respectively.