Available with Spatial Analyst license.
The Feature Preserving Smoothing tool smooths an input surface raster, such as digital elevation model (DEM) or digital surface model (DSM) rasters. The resulting raster is a smoothed version of the original DEM from which noise (such as small bumps, pits, and low-gradient slope breaks) has been removed without significantly altering other landscape features.
The tool has several input parameters that allow you to control the smoothing process, such as the input neighborhood distance, the input normal difference threshold, the input number of iterations, and the input maximum elevation change threshold. Each of these parameters control a unique perspective of the smoothing or feature preserving process. But they often need to be used in combination to get the desired output smoothness.
Neighborhood distance
The Neighborhood Distance parameter defines the neighborhood size used by the smoothing algorithm. It can be specified as the number of cells or as a map distance, depending on the Distance Units parameter setting. It is measured from the center of the current processing cell to the center of an orthogonal neighbor. The smallest allowed neighborhood distance is 1 cell (or equal to the cell size of the input raster if it is specified using a distance value), which results in a 3 by 3 cell window.
If a neighborhood distance is specified that does not result in an integer interval of the cell size, it will round up to the next interval of the cell size. For example, for a cell size of 10 meters, if a neighborhood distance of 19 meters was specified, the algorithm will round up to the next interval of the cell size, 20 meters (two times the cell size), resulting in a 5 by 5 cell window.
The size of the neighborhood affects the effectiveness of the smoothing algorithm. A larger neighborhood can increase the overall smoothness of the output. A smaller neighborhood allows the tool to focus more on local variability in the landscape, resulting in small features being smoothed away. Because noise is generally a small-scale phenomenon, typically the neighborhood size should be small. For example, a value of 5 for the Neighborhood Distance parameter, which results in an 11 by 11 cell processing window, is typically effective at ensuring that only the noise is smoothed away.
Normal difference threshold
With the Feature Preserving Smoothing tool, the filtering algorithm calculates weighted average on normal vectors instead of cell values. A normal vector is a 3D vector perpendicular to the tangent plane at a cell location, with a magnitude of 1. The following image illustrates a surface normal vector in a cross-section view:
The tool calculates a normal vector field for all the cells in the neighborhood of the current processing cell. A normal difference is defined as the angle formed between the normal vector of the current processing cell and the normal vector of a neighboring cell. The following image shows an example of a normal vector field and normal difference:
Not all neighboring cells will be used in the filtering. The Normal Difference Threshold parameter is used by the filtering algorithm to determine which neighboring cells are used—only those cells whose normal difference with the current cell is less than this parameter setting will be used.
The Normal Difference Threshold parameter represents a threshold for the edge steepness preservation. Feature edges flatter than this value can be smoothed away. Feature edges that are steeper than this value are preserved. In most cases, a small value (such as 15 degrees or less) should be specified for this parameter to ensure that only flat features are smoothed away.
Number of iterations
A single application of the smoothing process may not achieve the degree of output smoothness needed. Specifying a value greater than 1 for the Number of Iterations parameter allows the tool to repeat the smoothing process multiple times.
The accumulated effect will increase the smoothness of the output raster, at the expense of additional processing time. In most cases, a small value (such as 3) should work well.
Maximum elevation change
The Maximum Elevation Change parameter allows you to define the maximum allowed change of cell values in one iteration.
This parameter represents a threshold for the feature height changes. Features that are shorter than this value can be smoothed away. Features that are taller than this value are preserved. In most cases, a small value (such as 0.5 meters) should be specified for this parameter to ensure that only short features are smoothed away.
Feature preserving smoothing algorithm
The Feature Preserving Smoothing tool is based on a 3D normal vector approach that smooths DEM rasters (see Lindsay et al, 2019).
For a given cell, a 3D normal vector, n = (a, b, c), is a vector that is perpendicular to the tangent plane at the cell location. The plane is defined by the following equation:
ax + by + cz + d = 0
The tool first computes a normal vector for each cell in the current cell's neighborhood.
Next, for the current cell, it performs a weighted average of the normal vectors of the neighboring cells. The weight for a neighboring cell j is determined as follows:
If θj is less than θt, the following equation applies:
- Where:
θj is the normal difference between the current cell and the neighboring cell j
θt is the normal difference threshold
If θj is greater than or equal to θt, then Wj = 0, which excludes neighboring cell j from the weighted average.
Finally, the smoothed surface normal vector is used to derive a new height value at the current cell location by substituting a, b, and c in the first equation and solves for z.
When the new z-value is used to update the value at a cell location, it is compared with the original elevation value at that location. If the difference is not greater than the Maximum Elevation Change input parameter value, the new z-value will be used. Otherwise, the original elevation value remains unchanged. The smoothing process is repeated for the number of times as defined by the Number of Iterations input parameter value.
Use of a GPU
This tool can deliver increased performance if you have certain GPU hardware installed on your system. See GPU Processing with Spatial Analyst for details on how this capability is supported, how to configure it, and how to enable it.
References
Lindsay, John B., Anthony Francioni, and Jaclyn M. H. Cockburn. 2019. "LiDAR DEM Smoothing and the Preservation of Drainage Features." Remote Sensing 11, Number 16, 1926. https://doi.org/10.3390/rs11161926
Sun, Xiangfang, Paul L. Rosin, Ralph Martin, and Frank Langbein. 2007. "Fast and effective feature-preserving mesh denoising." IEEE Transactions on Visualization and Computer Graphics Volume 13, Issue 5. pp. 925–938. https://doi.org/10.1109/TVCG.2007.1065