Hi everyone,
In 2016 I wrote a post about geTexture, a small web application that Giuseppe Naponiello developed for us to read the USDA Soil Texture Triangle during excavations. That tool was in Italian and needed a browser connected to a server. In the last few days I have come back to the same problem with a different approach: a single HTML page that works completely offline.
The result is USDA Soil Texture Triangle, a small application for determining the texture class of a soil from the percentages of sand, silt and clay. It uses the 12 classes and the boundaries of the USDA Soil Survey Manual (Agriculture Handbook No. 18, 4th edition, 2018, chapter 3, pp. 122–124). It is written in JavaScript with Raphaël and released under the GNU General Public License v3.0 or later.
Why another triangle? Because in the field the texture of a layer is often estimated by feel, while the sedimentation test gives three percentages that still have to be converted into a class. With the printed triangle this is slow, and for students and new diggers it is easy to make mistakes. The app accepts any two values and calculates the third; the last two fields you edit stay manual, so you can start from clay+silt, clay+sand or silt+sand. The point moves on the triangle, the corresponding class is highlighted, and a click on the triangle does the inverse operation: from a position to a composition. The legend gives the official definition of each class.
Classification uses the USDA inequalities directly, not a polygon traced by hand. The polygons used for drawing are generated from the same rules with shapely, so they match the classification by construction. A Python script builds the dataset from a readable rules.json file and validates it on 18 test cases. The interface is bilingual (Italian and English) and switches the decimal separator as well. Since everything is local, the app also runs from a USB stick without an internet connection.
Below, you can see the app with clay 20 %, silt 40 % and sand 40 %, which gives a Loam class (Franco, in Italian).
|
| The USDA Soil Texture Triangle with clay 20 %, silt 40 % and sand 40 %: the point falls in the Loam class. |
The application is available at lucaarcteam.github.io/soil-texture-triangle, while the source code, the rules and the build script are on GitHub. The project is still under development. At the moment it covers only the USDA system: WRB and UK-ADAS use different classes and boundaries, and the sand subclasses (coarse sand, fine sand, very fine sand) are not implemented because they require the full particle-size distribution. Feedback from colleagues working in geoarchaeology is welcome.
I hope you find this useful. Have a nice day!


