
Welcome to The Soil Texture Wizard project!

The Soil Texture Wizard is a
set of R functions designed to produce texture triangle plots. It also
allows to classify soil textures data according to a classification,
and to transform them according to different texture particle size
class systems.
In short
Related projects
Other projects exists that provides useful soil-related R functions
(toolboxes for the pedometrician):
- aqp.
'Algorithms for Quantitative Pedology';
- soilwater.
Provides soil water retention functions and soil hydraulic conductivity
functions and pedotransfer functions to estimate their parameter from
easily available soil properties;
Other packages that may interest soil scientists are:
- soil.spec. Soil spectral data exploration and
regression functions;
- HydroMe.
Estimation of Soil Hydraulic Parameters from Experimental Data;
- SoPhy. A defunct
package that implemented a 2D water infiltration model into R;
Package installation
For installing the package,
try first:
install.packages("soiltexture")
If it doesn't work, or if you don't have the latest release of R, try
instead:
install.packages("soiltexture", repos = "http://R-Forge.R-project.org")
or:
install.packages("soiltexture", repos = "http://R-Forge.R-project.org",
type = "source")
If it doesn't work, try to load the sources instead (this method does
not install the help page):
source(
"https://r-forge.r-project.org/scm/viewvc.php/*checkout*/pkg/soiltexture/R/soiltexture.R?root=soiltexture"
)
Features list
"The Soil Texture Wizard" is an integrated set of
functions for the R
software for statistical computing, that allows to:
- Create clear, readable soil texture triangles graphics (also called ternary
plots or soil texture diagrams), with proper axis labels, either
"neutral", or with one of the 14 soil texture
classification systems actually pre-defined:
- USDA;
- FAO (which is also the triangle for the soil map of Europe);
- Aisne (France);
- GEPPA (France);
- German triangle (Bodenkundliche Kartieranleitung 1994);
- German triangle (Standortserkundungsanweisung SEA 1974) for forest soils (new 2011/10/11);
- German triangle (TGL 24300-05, landwirtschaftliche Böden, 1985) for arable soils (new 2011/10/15);
- Soil Survey of England and Wales (UK);
- Australian triangle;
- Belgian triangle (new 2009/10/15);
- Canadian triangle (new 2010/04/16);
- ISSS triangle (new 2010/05/13);
- Romanian texture triangle (new
2010-06-09);
- Polish triangle (Systematyka gleb Polski, 1989, for non-alluvial soils -- new).
Many thanks to Wei
Shangguan, from the School of geography of Beijing normal
university for providing the code of ISSS the triangle, to Rosca
Bogdan (from Romanian Academy, Iasi Branch, Geography team) for
providing the code for the Romanian triangle, to Wiktor Zelazny for providing the code for the Polish triangle (and the polish language translation of triangle labels) and to Rainer Petzold (Staatsbetrieb Sachsenforst) for providing the code of the German SEA 1974 and TGL 1985 triangles.
- Implement new texture triangles or create
personalized texture triangles, that will be usable as any of
the above mentioned soil textures triangle (graphs, classification,
etc.);
- Numerous graphical possibilities to display
soil texture data in a texture triangle, following an option
system similar to R plot(), points() and text() functions:
- Simple graphics (points);
- Bubble charts (points sizes and colors are proportional to a 4th
variable);
- Graph with text instead of points.
- Calculate the texture class(es) (= classification) to which belong soil texture
data, in 1 of the 7 predefined system / classification / triangle (or
your own custom triangle);
- Transform soil textures data from 1 particle sizes system (limits between the
clay, silt and sand particles) to another
particle size system, with a log-linear transformation (estimation).
For instance, it is possible to convert a textures data table measured
in a system that have a silt / sand limit is 60 micrometers into a
system that has a silt / sand limit is 50 micrometers. It is also possible to define your own texture
transformation function, and use it for on-the-fly transformation of
data in texture plots or for texture classification.;
- Display a texture triangle / classification in
a (triangle) geometry different from its default (triangle) geometry.
For instance, a texture triangle / classification usually displayed in
an isosceles triangle can be displayed in a right-angled triangle. The
geometrical parameters that can be changed are:
- The 3 angles of the triangle (free);
- The "direction" of increasing textures for each axes (clockwise,
anti-clockwise or "centripetal");
- The location of the 3 texture classes (clay, silt and sand) on
the 3 axes (abscissae, left or right axis).
Over-plot
/ superimpose 2 different texture triangles / classifications
into one single plot, whatever their initial "geometry" (for instance
the German right-angled soil texture triangle and the USDA isosceles
texture triangle can be over-plotted (into a given geometry));
- On the fly transformation of textures data particle size when
plotting a soil texture triangle;
- On the fly transformation of a triangle particle size when
over-plotting 2 (different) texture triangles;
- Contour plot or image plot of:
- 2D kernel density estimation (based on R-MASS kde2d function) (new 2009/10/13)
- Mahalanobis distance (based on R mahalanobis function), with or
without additive log-ratio transformation (new
2009/10/13)
- Inverse weighted distance estimate / smoothing of a 4th variable;
- Normalisation of texture datas sum of the 3 texture classes
to 100% (new 2009/10/13).
- Chose between 7 languages for the plot title
and the 3 axes legends (English, French, Swedish, German,
Spanish, Italian and Dutch), with a simple option;
- Most of the functions are optimised for
speed, and are thus suitable for mass /
batch treatment of soil textures data:
- 3400 soil textures data transformed per second;
- 14000 soil textures data "classified" per second;
(Under Windows XP, Intel Core 2 Duo,
2,66 Ghz, 3,23 Gb of RAM)
Other works and softwares on soil textures
(triangles)
Numerous other works and softwares exist that deal with
soil textures and soil textures triangles. Nevertheless, to my
knowledge, The Soil Texture Wizard is the only
tool that offers an integrated set of functionalities for soil textures
(smart graphs + classification + multi-triangle + multi-geometry).
Ternary graphs (without soil textures classes):
triangle.plot() and triangle.biplot()
functions, from the R package ADE4, by Daniel Chessel, Anne-Beatrice
Dufour and Stephane Dray. These functions are not specialised in soil
textures plots (and can not plot soil texture classes), but offer of
nice "zoom" feature that dont exist in
The Soil Texture Wizard, nor in the PLOTRIX package (see below). For
illustrations, see the web-page on triangle.plot() on the R Graph Gallery,
by Romain Francois.
ternaryplot() function in the R package VCD
by David Meyer, Achim Zeileis and Kurt Hornik. For illustrations, see
the web-page on ternaryplot() on the R Graph Gallery, by
Romain Francois.
Ternary graphs (with soil textures classes):
The functions soil.texture() and soil.texture.uk() from the R
package PLOTRIX, by Jim Lemon et
al. It allows to create graphs, with or without soil textures data,
following the USDA or the UK soil texture triangles. There is also an
underlying ternary plot function that can be used without soil texture
classes. It is nevertheless not possible to project the triangles into
another geometry, nor to transform or classify soil textures data. The R functions presented here ("The Soil Texture
Wizard") are originally (i.e. 3 years ago) derived from some functions
of the PLOTRIX package. Now, there probably not a single
common line of code, and the 2 set of functions are unfortunately not
compatible. But The Soil Texture Wizard obviously wouldnt exist if I
havent been able to freely adapt the code from PLOTRIX (reason why
free and open-source licences are so great). For illustrations of
PLOTRIX, see the web-page on soil.texture() on the R Graph Gallery, by
Romain Francois.
Automatic classification:
Texture
Autolookup, by Christopher Teh Boon Sung is a
standalone program, with a graphical user interface, that can classify
soil textures following the USDA, UK, Canadian, FAO texture triangles,
or 7 other systems. The work has been published in two articles of
"Communications in Soil and Plant Analysis", in 1996 and 2003. The
software also allows to plot / visualise soil texture data (but the
plot function is not very advanced), in 2 different triangle geometries.
TRIANGLE, "A Program For Soil Textural Classification",
by Aris Gerakis and Brian Baer allows to classify soil
textures data after the USDA soil texture triangle (published in the Soil Science Society of America
Journal in 1999).
r.soils.texture is a [Grass-GIS
http://grass.osgeo.org/] add-on for classifying raster files of soil
textures with 3 classification systems (USDA, FAO, ISSS). Note that
this is not R code.
Articles related to soil texture triangles or
systems
Richer de Forges A., Feller C.,
Jamagne M. & Arrouays D., 2008. "Perdus dans le triangle
des textures" (Études et Gestion des Sols, 15:2, pp. 97-111)
(en: "Lost in the textures triangle") are
presenting a gallery of 29 soil textures triangles, either still in use
nowadays or that were used in the past, from France and other
countries, and comparing the location of soil texture triangles limits
between several triangles. The article also presents a table comparing
the particle size limits (for clay, silt and sand fractions) between
numerous countries. See also their poster in English.
The "comparison" work has been done with a geographic information
system (ArcGIS?).
B. Minasny and A.B. McBratney. The australian soil
texture boomerang: a comparison of the australian and usda/fao soil
particle-size classication systems. Australian Journal of Soil
Research, 39:1443-1451, 2001. LINK.
A. Nemes, J.H.M. Wösten, A. Lilly,
and J.H. Oude Voshaar. Evaluation
of different procedures to interpolate particle-size distributions to
achieve compatibility within soil databases. Geoderma,
90:187-202, 1999. LINK.
Roadmap
(suceptible to changes):
- The functions provided by the soiltexture package are considered
as beta / almost stable, but they need to be tested by more users.
- The main function TT.plot() is now documented.
- TT.points.in.classes() is also documented.
- The documentation is under construction for the rest of the
package (using inlinedocs),
and will be gradually completed.
- ...
Feedbacks, contact, license, credit and
(absence of) guaranty
Feedbacks & contacts
Feedbacks on the package are always welcome:
Credits
See the latest package DESCRIPTION for a list of the authors to credit if
you cite / mesion this package.
License & garantees
This package is a Free & Open Source Software (GNU
Affero GPL >= 3). Its documentation is licensed under a Creatice
Commons BY-SA. You are free to copy, distribute and modify this
package, but please make sure you make it clear that your version is
different from the original (i.e. cite the original authors, give the
package another name, and make it clear the original authors don't
endorse the changes).
The R functions and the documents presented here have been created and
tested carefully but, given the free distribution of this work and the
highly permissive license, the author is not providing any guarantee of
exactitude of the data and functions, and decline any responsibility
regarding the use that could be done with that work.

This webpage is licenced under a Creative Commons
Licence.