Table of Contents
Watermapping algorithmsFlooding sea and lakesI still haven't written a description of water flooding here, but nobody has asked. The basic concept is relatively easy, but the optimised implementation in L3DT is fairly scary. Water table and salinity mappingThe water table modelling algorithm in L3DT calculates a water 'heightfield' that roughly follows the rise and fall of the terrain whilst smoothly connecting all of the water bodies (sea, lakes, etc). The purpose of calculating the water table is to allow the attributes map algorithm to assign waterdependent land types such as lake mud, beach sand, lush grass and deep desert. In outline, the algorithm calculates the height of the water table at each pixel using the terrain and water table height of its neighbours, and then iterates several times to reach a stable solution. In algebraic form, a change in the terrain height (δh) when moving from point a to point b causes a corresponding change in the height of the water table (δw) that may be expressed as:
δw_{ab} = c_{grad} × δh_{ab}  c_{loss} where:
Using the above equation, the algorithm rasters across the map in various directions^{2)} calculating the height of the water table at each pixel, based on the water table height of the last pixel and the change in terrain height from the last pixel to the current pixel. If the calculated value is greater than the current water table height, the water table is set to the new height and the algorithm moves on to another pixel. The procedure is iterated a few times to achieve a satisfactory solution. This equation is a massive simplification of genuine hydrologicalmodelling, with all of the complex parameters such as soil porosity, rainfall, and soforth being hidden in those coefficients. They are, therefore, effectively arbitrary, so please feelfree to tinker with them in the 'water table modelling' wizard. Salinity is handled in a similar manner to the watertable height, but with a slightly different equation that has, at best, marginal grounding in reality.
There are more pretty screenshots of this in the water map display schemes guide. RiversThe RainMaker plugin is about all I've done for rivers so far. I intend to revisit this someday. ^{1)}
In my implementation, the gradient coefficient is split into two (c_{rise} and c_{fall}) for rising or falling land.
^{2)}
Eight raster orders are used for this.
Except where otherwise noted, content on this wiki is licensed under the following license:CC AttributionShare Alike 3.0 Unported
