Flow modeling on grid terrains. Why GIS?  How it all started.. Duke Environmental researchers: computing flow accumulation for Appalachian Mountains.

Slides:



Advertisements
Similar presentations
Lars Arge 1/43 Big Terrain Data Analysis Algorithms in the Field Workshop SoCG June 19, 2012 Lars Arge.
Advertisements

Lars Arge 1/13 Efficient Handling of Massive (Terrain) Datasets Lars Arge A A R H U S U N I V E R S I T E T Department of Computer Science.
An open source version of the Nonpoint-Source Pollution and Erosion Comparison Tool Climate Tools Café Webinar Dave Eslinger, Ph.D. 3 May, 2012.
Hydrological Network Modelling GEOG1002 Dr P. Lewis.
Standard watershed and stream delineation recipe - Vector stream (ex. NHD data) fusion into DEM raster (burning in) - Sink removal - Flow direction - Flow.
Modeling & Analyzing Massive Terrain Data Sets (STREAM Project) Pankaj K. Agarwal Workshop on Algorithms for Modern Massive Data Sets.
Raster Based GIS Analysis
I/O-Algorithms Lars Arge January 31, Lars Arge I/O-algorithms 2 Random Access Machine Model Standard theoretical model of computation: –Infinite.
KELLY HAYDEN Applying GIS to Watershed Pollution Management.
I/O-Algorithms Lars Arge Spring 2009 February 2, 2009.
I/O-Algorithms Lars Arge Spring 2009 January 27, 2009.
I/O-Algorithms Lars Arge Spring 2007 January 30, 2007.
I/O-Algorithms Lars Arge Aarhus University February 16, 2006.
I/O-Algorithms Lars Arge Aarhus University February 7, 2005.
I/O-Algorithms Lars Arge Aarhus University February 6, 2007.
I/O-Algorithms Lars Arge Spring 2006 February 2, 2006.
Flow Computation on Massive Grid Terrains
Lars Arge 1/14 A A R H U S U N I V E R S I T E T Department of Computer Science Efficient Handling of Massive (Terrain) Datasets Professor Lars Arge University.
I/O-Algorithms Lars Arge Aarhus University February 9, 2006.
Efficient Algorithms for Large-Scale GIS Applications Laura Toma Duke University.
CS 350 Algorithms for GIS. What is GIS? Definitions  A powerful set of tools for collecting, storing, retrieving at will, transforming and displaying.
I/O-Algorithms Lars Arge Aarhus University February 14, 2008.
Massive Data Algorithmics Faglig Dag, January 17, 2008 Gerth Stølting Brodal University of Aarhus Department of Computer Science.
School of Geography FACULTY OF ENVIRONMENT School of Geography FACULTY OF ENVIRONMENT GEOG5060 GIS and Environment Dr Steve Carver
IR Paolo Ferragina Dipartimento di Informatica Università di Pisa.
Some Potential Terrain Analysis Tools for ArcGIS David G. Tarboton
From Elevation Data to Watershed Hierarchies Pankaj K. Agarwal Duke University Supported by ARO W911NF
Flow modeling on grid terrains. DEM Representations TIN Grid Contour lines Sample points.
Lars Arge 1/12 Lars Arge. 2/12  Pervasive use of computers and sensors  Increased ability to acquire/store/process data → Massive data collected everywhere.
I/O-Algorithms Lars Arge Spring 2008 January 31, 2008.
Urban Storm-Water Management Plan Utilizing Arc View and HEC-HMS College Station, Texas Kara Corcoran CVEN 689.
From Topographic Maps to Digital Elevation Models Daniel Sheehan IS&T Academic Computing Anne Graham MIT Libraries.
Why calculate slope and Aspect? Study the flow of water Identify the habitats of plants Identify potential sites for urban growth Drainage patterns on.
Spatial data models (types)
TerraStream: From Elevation Data to Watershed Hierarchies Thursday, 08 November 2007 Andrew Danner (Swarthmore), T. Moelhave (Aarhus), K. Yi (HKUST), P.
TerraFlow Flow Computation on Massive Grid Terrains Helena Mitasova Dept. of Marine, Earth & Atmospheric Sciences, NCSU, USA
I/O-Algorithms Lars Arge Fall 2014 August 28, 2014.
Heavily based on slides by Lars Arge I/O-Algorithms Thomas Mølhave Spring 2012 February 9, 2012.
Bin Yao Spring 2014 (Slides were made available by Feifei Li) Advanced Topics in Data Management.
©2005 Austin Troy Lecture 15: Introduction to Terrain Analysis Using GIS-- Introduction to GIS By Austin Troy University of Vermont.
Raster Data Model.
Soil Movement in West Virginia Watersheds A GIS Assessment Greg Hamons Dr. Michael Strager Dr. Jingxin Wang.
Flow Simulation in TINs Drainage Queries in TINs: from local to global and back again S. Yu, M. van Kreveld, and J. Snoeylink.
CSE332: Data Abstractions Lecture 8: Memory Hierarchy Tyler Robison Summer
Terracost: Hazel, Toma, Vahrenhold, Wickremesinghe Terracost: A Versatile and Scalable Approach to Computing Least-Cost-Path Surfaces for Massive Grid-Based.
DMBS Internals I. What Should a DBMS Do? Store large amounts of data Process queries efficiently Allow multiple users to access the database concurrently.
L7 - Raster Algorithms L7 – Raster Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems.
Efficient Algorithms for Large-Scale GIS Applications Laura Toma Duke University.
INTRODUCTION TO GIS  Used to describe computer facilities which are used to handle data referenced to the spatial domain.  Has the ability to inter-
Flow Modeling on Massive Grids Laura Toma, Rajiv Wickremesinghe with Lars Arge, Jeff Chase, Jeff Vitter Pat Halpin, Dean Urban in collaboration with.
Laura TomaSimplified External memory Algorithms for Planar DAGs Simplified External Memory Algorithms for Planar DAGs July 2004 Lars Arge Laura Toma Duke.
Lecture 1: Basic Operators in Large Data CS 6931 Database Seminar.
DMBS Internals I. What Should a DBMS Do? Store large amounts of data Process queries efficiently Allow multiple users to access the database concurrently.
External Memory Graph Algorithms and Applications to GIS Laura Toma Bowdoin College.
TerraSTREAM: Terrain Processing Pipeline MADALGO – Center for Massive Data Algorithmics, a Center of the Danish National Research Foundation What TerraSTREAM.
INTRODUCTION TO GEOGRAPHICAL INFORMATION SYSTEM
Flow field representations for a grid DEM
Lecture 16: Data Storage Wednesday, November 6, 2006.
Digital Terrain Analysis for Massive Grids
CS 350 Algorithms for GIS.
Lecture 11: DMBS Internals
Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates to store the shape.
Data Sources for GIS in Water Resources by David R
Digital Elevation Models and Hydrology
Data Sources for GIS in Water Resources by David R
Advanced Topics in Data Management
Terrain Analysis Using Digital Elevation Models (TauDEM)
Data Sources for GIS in Water Resources
Presentation transcript:

Flow modeling on grid terrains

Why GIS?  How it all started.. Duke Environmental researchers: computing flow accumulation for Appalachian Mountains took 14 days (with 512MB memory) –800km x 800km at 100m resolution  ~64 million points  GIS (Geographic Information Systems) System that handles spatial data Visualization, processing, queries, analysis… Rich area of problems for Computer Science Graphics, graph theory, computational geometry, scientific computing…

GIS and the Environment Indispensable tool Monitoring: keep an eye on the state of earth systems using satellites and monitoring stations (water, pollution, ecosystems, urban development,…) Modeling and simulation: predict consequences of human actions and natural processes Analysis and risk assessment: find the problem areas and analyse the possible causes (soil erosion, groundwater pollution,..) Planning and decision support: provide information and tools for better management of resources Lots of rain Dry Precipitation in Tropical South America High nitrogen concentrations Nitrogen in Chesapeake Bay

GIS and the Environment Bald Head Island Renourishment Sediment flow

DEM Representations TIN 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, h xy  } 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

Massive Terrain Data  Remote sensing technology Massive amounts of terrain data Higher resolutions (1km, 100m, 30m, 10m, 1m,…)  NASA-SRTM Mission launched in 2001 Acquired data for 80% of earth at 30m resolution 5TB  USGS Most of US at 10m resolution  LIDAR 1m res

Example: LIDAR Terrain Data  Massive (irregular) point sets (1-10m resolution)  Relatively cheap and easy to collect Example: Jockey’s ridge (NC coast)

It’s Growing!  Appalachian Mountains Area if approx. 800 km x 800 km Sampled at: 100m resolution:  64 million points (128MB) 30m resolution:  640 (1.2GB) 10m resolution:  6400 = 6.4 billion (12GB) 1m resolution:  billion (1.2TB)

Computing on Massive Data  GRASS (open source GIS) Killed after running for 17 days on a 6700 x 4300 grid (approx 50 MB dataset)  TARDEM (research, U. Utah) Killed after running for 20 days on a x grid (appox 240 MB dataset) CPU utilization 5%, 3GB swap file  ArcInfo (ESRI, commercial GIS) Can handle the 240MB dataset Doesn’t work for datasets bigger than 2GB

Scalability Problem  We can compute FD and FA using simple O(N)- time algorithms ..but.. for large sets..?? Dataset Size (log)

Scalability Problem: Why?  Most (GIS) programs assume data fits in memory minimize only CPU computation  But.. Massive data does not fit in main memory! OS places data on disk and moves data between memory and disk as needed  Disk systems try to amortize large access time by transferring large contiguous blocks of data  When processing massive data disk I/O is the bottleneck, rather than CPU time!

Disks are Slow “The difference in speed between modern CPU and disk technologies is analogous to the difference in speed in sharpening a pencil using a sharpener on one’s desk or by taking an airplane to the other side of the world and using a sharpener on someone else’s desk.” (D. Comer)

Scalability to Large Data  Example: reading an array from disk Array size N = 10 elements Disk block size = 2 elements Memory size = 4 elements (2 blocks) Algorithm 2: Loads 5 blocksAlgorithm 1: Loads 10 blocks N blocks >> N/B blocks  Block size is large (32KB, 64KB)  N >> N/B N = 256 x 10 6, B = 8000, 1ms disk access time  N I/Os take 256 x 10 3 sec = 4266 min = 71 hr  N/B I/Os take 256/8 sec = 32 sec

I/O-model I/O-operation Read/write one block of data from/to disk I/O-complexity number of I/O-operations (I/Os) performed by the algorithm External memory or I/O-efficient algorithms: Minimize I/O-complexity RAM model CPU-operation CPU-complexity Number of CPU-operations performed by the algorithm Internal memory algorithms: Minimize CPU-complexity

I/O-Model Parameters N = # elements in problem instance B = # elements that fit in disk block M = # elements that fit in main memory Fundamental bounds: Scanning: scan(N) = Sorting: sort(N) = D P M Block I/O In practice block and main memory sizes are big

TerraFlow  TerraFlow is our suite of programs for flow routing and flow accumulation on massive grids [ATV`00,AC&al`02]  Flow routing and flow accumulation modeled as graph problems and solved in optimal I/O bounds  Efficient times faster on very large grids than existing software  Scalable 1 billion elements!! (>2GB data)  Flexible Allows multiple methods flow modeling

TerraFlow  TerraFlow is our suite of programs for flow routing and flow accumulation on massive grids [ATV`00,AC&al`02]  Flow routing and flow accumulation modeled as graph problems and solved in optimal I/O bounds  Efficient times faster on very large grids than existing software  Scalable 1 billion elements!! (>2GB data)  Flexible Allows multiple methods flow modeling

TerraFlow  GRASS cannot handle Hawaii dataset (killed after 17 days)  TARDEM cannot handle Cumberlands dataset (killed after 20 days)  Significant speedup over ArcInfo for large datasets East-Coast TerraFlow: 8.7 Hours ArcInfo: 78 Hours Washington state TerraFlow: 63 Hours ArcInfo: %

Massive Data Massive datasets are being collected everywhere Storage management software is billion-$ industry (More) Examples:  Phone: AT&T 20TB phone call database, wireless tracking  Consumer: WalMart 70TB database, buying patterns (supermarket checkout)  WEB: Web crawl of 200M pages and 2000M links, Akamai stores 7 billion clicks per day  Geography: NASA satellites generate 1.2TB per day