Flow Computation on Massive Grids
Download
Report
Transcript Flow Computation on Massive Grids
Flow modeling on grid terrains
DEM Representations
TIN
3
7
7
3
7
7
2
5
1
2
5
1
4
8
9
4
8
9
3
7
7
3
7
7
2
5
1
2
5
1
4
8
9
4
8
9
Grid
Contour lines
Sample points
Computations on Terrains
Reality:
Elevation of terrain is a
continuous function of
two variables h(x,y)
Estimate, predict, simulate
Flooding, pollution
Erosion, deposition
Vegetation structure
….
GIS:
DEM (Digital Elevation Model)
is a set of sample points
and their heights
{ x, y, hxy}
Model and
compute indices
Modeling Flow on Terrains
What happens when it rains?
• Predict areas susceptible to floods.
• Predict location of streams.
• Compute watersheds.
Flow is modeled using two basic attributes
• Flow Direction (FD)
• The direction water flows at a point
• Flow Accumulation (FA)
• Total amount of water that flows through a point
(if water is distributed according to the flow directions)
Flow Direction (FD) on Grids
Water flows downhill
• follows the gradient
On grids: Approximated using 3x3 neighborhood
• SFD (Single-Flow Direction):
• FD points to the steepest downslope neighbor
• MFD (Multiple-Flow direction)
• FD points to all downslope neighbors
:
Computing FD
Goal: compute FD for every cell in the grid (FD grid)
Algorithm:
• Scan the grid
• For each cell compute SFD/MFD by inspecting 8 neighbor cells
Analysis: O(N) time for a grid of N cells
Is this all?
• NO! flat areas: Plateas and sinks
FD on Flat Areas
…no obvious flow direction
Plateaus
• Assign flow directions such that each cell flows towards the nearest spill
point of the plateau
Sinks
• Either catch the water inside the sink
• Or route the water outside the sink using uphill flow directions
• model steady state of water and remove (fill)
sinks by simulating flooding: uniformly
pouring water on terrain until steady state
is reached
• Assign uphill flow directions on the original terrain by assigning
downhill flow directions on the flooded terrain
Flow Accumulation (FA) on Grids
FA models water flow through each cell with “uniform rain”
• Initially one unit of water in each cell
• Water distributed from each cell to neighbors pointed to by its FD
• Flow conservation: If several FD, distribute proportionally to height
difference
• Flow accumulation of cell is total flow through it
Goal: compute FA for every cell in the grid (FA grid)
Computing FA
FD graph:
• node for each cell
• (directed) edge from cell a to b if
FD of a points to b
FD graph must be acyclic
• ok on slopes, be careful on
plateaus
FD graph depends on the FD
method used
• SFD graph: a tree (or a set of trees)
• MFD graph: a DAG (or a set of
DAGs)
Computing FA: Plane Sweeping
Input: flow direction grid FD
Output: flow accumulation grid FA (initialized to 1)
Process cells in topological order. For each cell:
• Read its flow from FA grid and its direction from FD grid
• Update flow for downslope neighbors (all neighbors pointed to by
cell flow direction)
Correctness
• One sweep enough
Analysis
• O(sort) + O(N) time for a grid of N cells
Note: Topological order means decreasing height order
(since water flows downhill).
DEM and Flow Accumulation
[Panama]
Flow accumulation with MFD
Flow accumulation with SFD
Uses
Flow direction and flow accumulation are used for:
Computing other hydrological attributes
• river network
• moisture indices
• watersheds and watershed divides
Analysis and prediction of sediment
and pollutant movement in landscapes.
Decision support in land management, flood and pollution
prevention and disaster management