Digital Soil Mapping

Terrain Classification Experiment 2: GRASS, R, and the raster package

Submitted by dylan on Tue, 2011-05-24 16:37.

Quick post on terrain classification, based on some trouble folks were having with a previous example on Windows. With the spgrass6 package, raster stacks are created by loading several GRASS files at once: x <- readRAST6(vname=c('beam_sum_mj','ned10m_ccurv','ned10m_pcurv','ned10m_slope')). This works well on UNIX-like operating systems and in cases where the entire collection of raster maps can fit within the system memory. A different strategy is needed when working with massive raster stacks or on other (less useful) operating systems. This post outlines one possible strategy that should work on massive data sets, and across operating systems.

 
Outline

  1. export terrain surfaces from GRASS to intermediate files
  2. import into R with raster package
  3. perform unsupervised classification on a sample of the cells using PAM
  4. apply clustering to unsampled cells with randomForest
  5. save results to intermediate file
  6. import results into GRASS for post-processing

Terrain Classification ExampleTerrain Classification Example

New R Package 'aqp': Algorithms for Quantitative Pedology [updates]

Submitted by dylan on Mon, 2010-08-09 16:37.

 
Soils are routinely sampled and characterized according to genetic horizons (layers), resulting in data that are associated with principal dimensions: location (x,y), depth (z), and property space (p). The high dimensionality and grouped nature of this type of data can complicate standard analysis, summarization, and visualization. The aqp package was developed to address some of these issues, as well as provide a useful framework for the advancement of quantitative studies in soil genesis, geography, and classification.

Using R and r.mapcalc (GRASS) to Estimate Mean Topographic Curvature

Submitted by dylan on Tue, 2010-08-03 20:51.

Recently I was re-reading a paper on predictive soil mapping (Park et al, 2001), and considered testing one of their proposed terrain attributes in GRASS. The attribute, originally described by Blaszczynski (1997), is the distance-weighted mean difference in elevation applied to an n-by-n window of cells:



Equation 4 from (Park et al, 2001)

 
where n is the number of cells within an (odd-number dimension) square window excluding the central cell, z is the elevation at the central cell, z_{i} is the elevation at one of the surrounding cells i, d_{i} is the horizontal distance between the central cell and surrounding cell i. I wasn't able to get a quick answer using r.neighbors or r.mfilter, so I cooked up a simple R function to produce a solution using r.mapcalc. The results are compared with the source DEM below; concave regions are blue-ish, convex regions are red-ish. The magnitude and range are almost identical to mean curvature derived from v.surf.rst, with a Pearson's correlation coefficient of 0.99. I think that it would be of general interest to add functionality to r.neighbors so that it could perform distance-weighted versions of commonly used focal functions.

Elevation surface (left) and resulting mean curvature estimate (right)Elevation surface (left) and resulting mean curvature estimate (right)

Soil Depth Mapping at KREW 2

Submitted by dylan on Tue, 2010-03-02 19:58.
Soil Depth Mapping at KREW 2

linear regression with RCS

Soil Depth Mapping at KREW

Submitted by dylan on Tue, 2010-03-02 19:55.
Soil Depth Mapping at KREW

regression tree

Soil Profile Dendrogram

Submitted by dylan on Mon, 2009-11-09 01:25.
Soil Profile Dendrogram

GIS and Digital Soil Survey Projects

Submitted by vbullard on Fri, 2009-06-12 17:02.

My lab produces a variety of interpretive maps that have been repackaged from Digital Soil Survey and other geographic datasets.

New Technologies in Soil Survey

Submitted by vbullard on Fri, 2009-06-12 17:00.

Aspect angle is commonly used by soil scientists and ecologists as a qualitative proxy for landscape-scale variation in microclimate caused by the slope and orientation of relief.