Bug Description
Current sampling in extract_soil_gssurgo() uses counts, not true area-weighted aggregation. This can bias soil property estimates, especially for heterogeneous polygons.
Solution
- Use SoilDB package
- Not sure what of the following is handled by that package, but sampling should:
- Request SSURGO polygon geometries (GML) from WFS for the sampling area.
- Intersect polygons with sample buffers e.g. using
sf or terra.
- Compute area fractions
- Aggregate soil properties using these area weights.
References
Bug Description
Current sampling in
extract_soil_gssurgo()uses counts, not true area-weighted aggregation. This can bias soil property estimates, especially for heterogeneous polygons.Solution
sforterra.References