Skip to content

Latest commit

 

History

History
27 lines (17 loc) · 757 Bytes

README.md

File metadata and controls

27 lines (17 loc) · 757 Bytes

Read me

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.

USDA Soil Texture triangle chart

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