15.6 Digital Terrain Models
Digital terrain models may be used in various operations that are partly included in the operations discussed in the preceding sections.
Elevations
Using elevation data stored as a point cloud, the elevation of a random point can be computed as the weighted median of the surrounding points, with the closest points having the greatest weight. Neighboring points are searched within a specified area (Figure 15.17).
Mathematical functions more complex than the weighted median may also be used (kriging, etc.). The elevation of a new point in a grid model may be computed as the elevation of a plane passed through the closest grid points. Elevations may also be computed from the faces and corner elevations in a triangulated irregular network (TIN) model.

Figure 15.17
Area search.
Slope and slope direction
A terrain's angle of slope and direction may be computed relative to a plane through the elevation model points. In the raster model, the angle of slope can be calculated by moving a window—for example, with a size of 3 × 3 cells—over the raster, see Figure 15.12. Based on the nine values of the cells in the window, the slope of the cell in the center can be calculated in different ways. The simplest method to calculate the angle of slope is to calculate the maximum height difference between the center cell and the neighboring cells, and divide the height difference ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access