The Precision Farming Primer  Modeling Management Actions © 1999 Precision Farming Primer

Characterizing Micro Terrain (Part 1)  describes procedures for identifying convex and concave terrain features
Characterizing Micro Terrain (Part 2)   investigates localized variation as measure of surface roughness
Characterizing Micro Terrain (Part 3)   identifies a procedure for modeling surface water flow.

__________________________________

Characterizing Micro-Terrain (Part 1)

The past several columns investigated surface modeling and analysis.  The data surfaces derived in these instances weren't the familiar terrain surfaces you walk the dog, bike and hike on.  None-the-less they form surfaces that contain all of the recognizable gullies, hummocks, peaks and depressions we see on most hillsides.  The "wrinkled-carpet" look in the real world is directly transferable to the cognitive realm of the data world.

However, at least for the moment, let's return to terra firma to investigate how micro-terrain features can be characterized.  As you look at a landscape you easily see the changes in terrain with some areas bumped up (termed convex) and others pushed down (termed concave).  But how can a computer "see" the same thing?  Since its world is digital how can the lay of the landscape be transferred into a set of drab numbers?

Figure 1. Identifying Convex and Concave features by deviation from the trend of the terrain.

One of the most frequently used procedures involves comparing the trend of the surface to the actual elevation values.  Figure 1 shows a terrain profile extending across a small gully.  The dotted line identifies a smoothed curve fitted to the data, similar to a draftsman's alignment of a French curve.  It "splits-the-difference" in the succession of elevation values— half above and half below.  Locations above the trend line identify convex features while locations below identify concave ones.  The further above or below determines how pronounced the feature is.

In a GIS, simple smoothing of the actual elevation values derives the trend of the surface.  The left side of Fig. 2 shows the actual and smoothed surfaces for a project area.  The flat portion at the extreme left is an area of open water.  The terrain rises sharply from 500 feet to the 2500 feet at the top of the hill.  Note the small "saddle" (elevation dips down then up) between the two hilltops.  Also note the small depression in the relatively flat area in the lower SW portion.

In generating the smoothed surface, elevation values were averaged for a 4-by-4 window moved throughout the area.  Note the subtle differences between the surfaces—the tendency to pull-down the hilltops and push-up the gullies.

While you see (imagine?) these differences in the surfaces, the computer quantifies them by subtracting. The difference surface on the right contains values from -84 (prominent concave feature) to +94 (prominent convex feature).  The big bump on the difference surface corresponds to the smaller hilltop on elevation surface.  Its actual elevation is 2016 while the smoothed elevation is 1922 resulting in 2016 - 1922 = +94 difference.  In micro-terrain terms, these areas are likely drier that their surroundings as water flows away.

The other arrows on the surface indicate other interesting locations.  The "pockmark" in the foreground is a small depression (764 - 796 = -32 difference) that is likely wetter as water flows into it.  The "deep cut" at the opposite end (539 - 623 = -84) suggests a very prominent concavity.  However representing the water body as fixed elevation isn't a true account of terra firma configuration.

Figure 2. Example of a micro-terrain deviation surface.

In fact the entire concave feature in the upper left portion of 2-D representation of the difference surface is suspect due to its treatment of the water body as a constant elevation value.  While a fixed value for water on a topographic map works in traditional mapping contexts it's insufficient in most analytical applications.  Advanced GIS systems treat open water as "null" elevations (unknown) and "mirror" terrain conditions along these artificial edges to better represent the configuration of solid ground.

The 2-D map of differences identifies areas that are concave (dark red), convex (light blue) and transition (white portion having only -20 to +20 feet difference between actual and smoothed elevation values).  If it were a map of a farmer's field, the groupings would likely match a lot of the farmer's recollection of crop production—more water in the concave areas, less in the convex areas.

A
Colorado dryland wheat farmer knows that some of the best yields are in the lowlands while the uplands tend to "burn-out."  A farmer in Louisiana, on the other hand, likely see things reversed with good yields on the uplands while the lowlands often "flood-out."  In either case, it might make sense to change the seeding rate, hybrid type, and/or fertilization levels within areas of differing micro-terrain conditions.

The idea of variable rate response to spatial conditions has been around for thousands of years as indigenous peoples adjusted the spacing of holes they poked in the ground to drop in a seed and a piece of fish.  While the mechanical and green revolutions enable farmers to cultivate much larger areas they do so in part by applying broad generalizations of micro-terrain and other spatial variables over large areas.  The ability to continuously adjust management actions to unique spatial conditions on expansive tracks of land foretells the next revolution.

The ability to identify and investigate the effects of micro-terrain conditions goes well beyond the farm.  For example, the Universal Soil Loss Equation uses "average" watershed conditions, such as stream channel length and slope, dominant soil types and existing land use classes, to predict water runoff and sediment transport from large areas.  These non-spatial models are routinely used to determine the feasibility of spatial activities, such as logging, mining, road building and housing development.  While the procedures might be applicable to typical conditions, they less accurately track unusual conditions clumped throughout an area and provide no spatial guidance within the boundaries of the modeled area.

GIS-based micro-terrain analysis can help us be more like a "modern ancient farmer"— responding to site-specific conditions over large expanses of the landscape.  Calculation of a difference surface simply scratches the surface of micro-terrain analysis.  In the next few columns we'll look other procedures that let us think like a raindrop while mapping the micro-terrain.

Characterizing Micro-Terrain (Part 2)

Last month's column described a technique for characterizing micro-terrain features involving the difference between the actual elevation values and those on a smoothed elevation surface (trend).  Positive values on the difference map indicate areas that "bump-up" (drier) while negative values indicate areas that "dip-down" from the general trend in the data (wetter).

Figure 1.  Localized deviation uses a spatial filter to compare a location to its surroundings.

A related technique to identify the bumps and dips of the terrain involves moving a "roving window" (termed a spatial filter) throughout an elevation surface.  The localized deviation within a roving window is calculated by subtracting the average of the surrounding elevations from the center location's elevation.

As depicted in the example calculations for the concave feature, the average elevation of the surroundings is 106, that computes to a -6.00 deviation when subtracted from the center's value of 100.  The negative sign denotes a concavity while the magnitude of 6 indicates it's fairly significant dip (a 6/100= .06).  The protrusion above its surroundings (termed a convex feature) shown on the right of the figure has a localized deviation of +4.25 indicating a somewhat pronounced bump (4.25/114= .04).

Figure 2.  Applying Deviation and Coefficient of Variation filters to an elevation surface.

The result of moving a deviation filter throughout an elevation surface is shown in the top right inset in figure 2.  Its effect is nearly identical to the trend analysis described last month-- comparison of each location's actual elevation to the typical elevation (trend) in its vicinity.  Interpretation of a Deviation Surface is the same as that for the difference surface discussed last month—protrusions (large positive values) locate drier convex areas; depressions (large negative values) locate wetter concave areas.

The implication of the "Localized Deviation" approach goes far beyond simply an alternative procedure for calculating terrain irregularities.  The use of "roving windows" provides a host of new metrics and map surfaces for assessing micro-terrain characteristics.  For example, consider the Coefficient of Variation (Coffvar) Surface shown in the bottom-right portion of figure 2.  In this instance, the standard deviation of the window is compared to its average elevation—small "coffvar" values indicate areas with minimal differences in elevation; large values indicate areas with lots of different elevations.  The large ridge in the Coffvar surface in the figure occurs along the shoreline of a lake.  Note that the ridge is largest for the steeply-rising terrain with big changes in elevation.  The other bumps of surface variability noted in the figure indicate areas of less terrain variation.

While a statistical summary of elevation values is useful as a general indicator of surface variation or "roughness," it doesn't consider the pattern of the differences.  A checkerboard pattern of alternating higher and lower values (very rough) cannot be distinguished from one in which all of the higher values are in one portion of the window and lower values in another.

Figure 3.  Calculation of slope considers the arrangement and magnitude of elevation differences within a roving window.

There are several roving window operations that track the spatial arrangement of the elevation values as well as aggregate statistics.  A frequently used one is terrain slope that calculates the "slant" of a surface.  In mathematical terms, slope equals the difference in elevation (termed the "rise") divided by the horizontal distance (termed the "run").

As shown in figure 3, there are eight surrounding elevation values in a 3x3 roving window.  An individual slope from the center cell can be calculated for each one.  For example, the percent slope to the north (top of the window) is ((2332 - 2262) / 328) * 100 = 21.3%.  The numerator computes the rise while the denominator of 328 feet is the distance between the centers of the two cells.  The calculations for the northeast slope is ((2420 - 2262) / 464) * 100 = 34.1%, where the run is increased to account for the diagonal distance (328 * 1.414 = 464).

The eight slope values can be used to identify the Maximum, the Minimum and the Average slope as reported in the figure.  Note that the large difference between the maximum and minimum slope (53 - 7 = 46) suggests that the overall slope is fairly variable.  Also note that the sign of the slope value indicates the direction of surface flow—positive slopes indicate flows into the center cell while negative ones indicate flows out.  While the flow into the center cell depends on the uphill conditions (we'll worry about that in a subsequent column), the flow away from the cell will take the steepest downhill slope (southwest flow in the example… you do the math).

In practice, the Average slope can be misleading.  It is supposed to indicate the overall slope within the window but fails to account for the spatial arrangement of the slope values.  An alternative technique "fits a plane" to the nine individual elevation values.  The procedure determines the best fitting plane by minimizing the deviations from the plane to the elevation values.  In the example, the Fitted slope is 65%… more than the maximum individual slope.

At first this might seem a bit fishy—overall slope more than the maximum slope—but believe me, determination of fitted slope is a different kettle of fish than simply scrutinizing the individual slopes.  Next time we'll look a bit deeper into this fitted slope thing and its applications in micro-terrain analysis. _______________________

Author's Notes: An Excel worksheet investigating Maximum, Minimum, and Average slope calculations is available online at the "Column Supplements" page at http://www.innovativegis.com/basis.

Characterizing Micro-Terrain (Part 3)

Last month's discussions focused on localized variation and terrain steepness.  While the concepts are simple and straightforward, the mechanics of computing them are a bit unfamiliar.  The modeling of surface flows follows in the same tradition.  Water has a simple vantage point of the slopes it encounters— given its head it follows the law of gravity and takes the steepest downhill path (sort of like an out-of-control skier).

Figure 1.  Map of surface flow confluence.

Figure 1 shows a 3-D grid map of an elevation surface and the resulting flow confluence.  The calculations are based on the assumption that water will follow a path that chooses the steepest downhill step at each point (grid cell "step") along the terrain surface.

In effect, a drop of water is placed at each location and allowed to pick its path down the terrain surface.  Each grid cell that is traversed gets the value of one added to it.  As the paths from other locations are considered the areas sharing common paths get increasing larger values (one + one + one, etc.).

The inset on the right side of the figure shows the path taken by a couple of drops into a slight depression.  The inset on the left shows the considerable inflow for the depression as a high peak in the 3-D display—a collection point.  The high value indicates that a lot of uphill locations are connected to this feature.  However, note that the pathways to the depression are concentrated along the southern edge of the area.

Figure 2.  2-D, 3-D and draped displays of surface flow confluence.

Now turn your attention to figure 2.  Ridges on the confluence density surface (lower left) identify areas of high surface flow.  Note how these areas (darker) align with the creases in the terrain as shown on the draped elevation surface on the right inset.  The water collection in the "saddle" between the two hills is obvious, as are the two westerly facing confluences on the side of the hills.  The 2-D map in the upper left provides a more familiar view of the gully washers (darker locations).

So far, the various spatial analysis techniques for characterizing terrain surfaces introduced in this series provide a wealth of different perspectives on surface configuration.  Recall that the Deviation from Trend, Difference Maps and Deviation Surfaces are used to identify areas that "bump-up" (convex) or "dip-down" (concave).  A Coefficient of Variation Surface looks at the overall disparity in elevation values occurring within a small area.  A Slope Map shares a similar algorithm (roving window) but the summary of is different and reports the "tilt" of the surface.  An Aspect Map extends the analysis to include the direction of the tilt as well as the magnitude.  And finally, a Confluence Map takes an extended view and characterizes the number of uphill locations connected to each location to characterize surface flow.

The coincidence of these varied perspectives can provide valuable input to decision-making.  Areas that are smooth, steep and coincide with high confluence are strong candidates for gully-washers that gouge the land.  On the other hand, areas that are rough, gently-sloped and with minimal confluence are relatively stable.  Concave features in these areas tend to trap water and recharge soil moisture and the water table.  Convex features under erosive conditions tend to become more prominent as the confluence of water flows around it.

While these "rules-of-thumb" make sense in most situations, there are several exceptions that can undercut them.  Two concerns in particular are important— conditions and resolution.  First, conditions along the surface can alter the effect of terrain characteristics.  For example, soil properties and the vegetation at a location greatly effects surface runoff and sediment transport.  The nature of accumulated distance along the surface is also a determinant.  If the uphill slopes are long steep, the water flow has accumulated force and considerable erosion potential.

In addition, the resolution of the elevation grid can effect the calculations.  In the case of water drops the gridding resolution and accurate "Z" values must be high to capture the subtle twists and bends that direct water flow.  This concern is crucial in the subtle micro-terrain changes across most agricultural fields.  While elevation data within a few meters is sufficient for planning highways and development, agricultural applications require much more detail.

Enter RTK (Real Time Kinematic) GPS technology you might have heard about— it builds terrain maps to centimeter accuracy.  This detail coupled with terrain analysis promises a pretty good picture of the flows within a field (erosion, accretion, infiltration, runoff, fines, organic matter, sediment transport, etc.).  In site-specific terms this information could be the next frontier in the revolutionary field of precision farming.