This library provides an API to classify the soil texture based on the percentage of clay, sand, silt as defined in the USDA soil texture triangle calculator. This does not implement the classification of coarse, fine and very fine sands or loams.
This library is unlicensed and not published on Crates.io, please open an issue if you want it published or licensed.
use soil::SoilTexture;
match SoilTexture::new(0.0, 0.0, 1.0); {
SoilTexture::Clay(_, _, _) => println!("clay"),
_ => println!("not clay"),
SoilTexture::Unknown => panic!("clay"),
}
*[USDA]: United States Department of Agriculture