multicriteria decision analysis for topological routing using

23
Multicriteria Decision Analysis for Topological Routing Using PostgreSQL/PostGIS and pgRouting Allan Adair University of Texas at Dallas GIS Workshop – Summer 2008 July 30, 2008 pgRouting

Upload: databaseguys

Post on 23-Jun-2015

232 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Multicriteria Decision Analysis for Topological Routing Using

Multicriteria Decision Analysis for Topological Routing Using

PostgreSQL/PostGIS and pgRouting

Allan AdairUniversity of Texas at Dallas

GIS Workshop – Summer 2008July 30, 2008

pgRouting

Page 2: Multicriteria Decision Analysis for Topological Routing Using

Table of Contents

• Introduction• Problem Statement• Literature Review• Data Description• Methods for Analysis• Results• Conclusions and Future Research• References

Page 3: Multicriteria Decision Analysis for Topological Routing Using

Introduction

What is PostgreSQL/PostGIS?• PostgreSQL is an award-winning relational

database that has arguably been around since the 1970s.

• PostgreSQL is free and open source, with a huge global community of developers keeping the project up to date with the latest standard database technologies.

• See the project website: http://www.postgresql.org

Page 4: Multicriteria Decision Analysis for Topological Routing Using

Introduction

What is PostgreSQL/PostGIS?• PostGIS is an extension of PostgreSQL

developed by Refractions Research.• It spatially enables what would normally be a

tabular database, much like ESRI’s ArcSDE.• It has made such an impact that ESRI’s latest

release of ArcSDE (9.3) supports PostGIS layers.

• See the project website: http://postgis.refractions.net/

Page 5: Multicriteria Decision Analysis for Topological Routing Using

Introduction

What is pgRouting?• pgRouting is a free, open-source project

maintained by PostLBS, which provides core tools for Location Based Services (LBS) as Open Source Software (OSS).

• pgRouting's main objective is to provide routing functionality to PostgreSQL/PostGIS.

• The provided tools are similar to those found in proprietary software packages.

• See the project website: http://pgrouting.postlbs.org/

Page 6: Multicriteria Decision Analysis for Topological Routing Using

Introduction

What is pgRouting?• pgRouting can solve shortest path and TSP

(Traveling Sales Person) problems.• Currently, pgRouting offers the following routing

algorithms:– Dijkstra (no heuristics, absolute)– A* (with heuristics, good for large datasets)– Shooting Star (allows for turn restrictions in road

networks)– TSP (solves Traveling Sales Person problems)

Page 7: Multicriteria Decision Analysis for Topological Routing Using

Introduction

Why go through the trouble if ArcGIS can already perform complex topological tasks?

• OSS software is more academic in nature than closed-source commercial applications.

• OSS software complies better with OGC standards (Open Geospatial Consortium). Ironically many of these standards were set by ESRI.

• OSS software is free.• It’s always good to have alternative choices.• Again OSS software is free, so if you can perform your

GIS tasks reliably and with confidence, why use ESRI or other commercial vendors if it can do the same job just as well and at a lower cost?

Page 8: Multicriteria Decision Analysis for Topological Routing Using

Introduction

Why go through the trouble if ArcGIS can already perform complex topological tasks?

• ArcGIS has annoying licensing restrictions and associated complications.

• Example: ArcSDE is an integrated part of the ArcView license, but you can’t create relationships without an ArcEditor or ArcView license. That’s just plain wrong.

• You have to purchase ArcGIS Server to allow simultaneous multi-user editing. Budget restrictions may not allow for that necessity.

• PostGIS allows simultaneous multi-user editing for free. It’s a long standing database technology.

Page 9: Multicriteria Decision Analysis for Topological Routing Using

Introduction

• For this project, I have made a tutorial for the installation and use of PostgreSQL/PostGIS and pgRouting.

• It will be posted on my student web space in the near future: http://www.utdallas.edu/~ama054000/

Page 10: Multicriteria Decision Analysis for Topological Routing Using

Problem Statement

• An electric company plans to build a new transmission line from one switching station to another.

• From a series of potential routes, they have already chosen a few alternatives based on different objectives.

• They have decided to “contract-out” an environmental analysis (EA) optimal routing operation to decide the path of least cost to the environment.

• This procedure will involve the evaluation of alternative routes, and play a part in the preparation of an Environmental Assessment (EA) that will support the application for a Certificate of Convenience and Necessity (CCN).

Page 11: Multicriteria Decision Analysis for Topological Routing Using

Literature Review

• Berry, Joseph K. Beyond Mapping: Concepts, Algorithms, and Issues in GIS. Fort Collins: GIS World Inc, 1993.

• Hobbs, Benjamin F., and Peter Meier. Energy Decisions and the Environment: A Guide to the Use of Multicriteria Methods. Boston: Kluwer Academic Publishers, 2003.

• Malczewski, Jacek. GIS and Multicriteria Decision Analysis. New York: John Wiley & Sons Inc, 1999.

• Mannino, Michael V. Database Design, Application Development, and Administration, 3rd Edition. New York: McGraw Hill/Irwin, 2007.

Page 12: Multicriteria Decision Analysis for Topological Routing Using

Data Description

• A series of simple line geometries without any supplemental topology information that form a graph.

• A series of geographic features (points, lines, polygons) representing existing real world objects that will influence the traversing costs along the network edges that will be created from the above mentioned graph.

Page 13: Multicriteria Decision Analysis for Topological Routing Using

Methods for Analysis

Multicriteria Decision Analysis• In the GIS world, it can be defined as “a collection of

techniques for analyzing geographic events where the results of the analysis (decisions) depend on the spatial arrangement of the events.” (Malczewski, 1999).

• There are several methods for weighting alternative decisions in MCDA, and from my experience a “Ranking” method is often used.

• This is somewhat arbitrary, but easy for people to understand. Understandability for the layperson is crucial since these kinds of projects have a lot of public involvement.

• Although attractively simple, there are problems with the ranking method due its arbitrary methods (Malczewski, 1999).

Page 14: Multicriteria Decision Analysis for Topological Routing Using

Methods for Analysis

Multicriteria Decision Analysis

Rank Sum Method of Estimating Weights (generic example)

Criterion Straight Rank Weight (n - rj + 1) Normalized Weight

Site Cost 4 2 0.133

Earthquake Probability 2 4 0.267

Accessibility 5 1 0.067

Population Proximity 1 5 0.333

Water Proximity 3 3 0.200

15 1.000

Page 15: Multicriteria Decision Analysis for Topological Routing Using

Methods for Analysis

Multicriteria Decision Analysis• Now we have the weights for our features, how

do we use that information to create single-value costs along our network edges?

• It can be a summation of estimated weights derived from each object’s distance from the edge (a function of distance).

• It can be a summation of estimated weights that fall within a certain distance (a buffer analysis). This would give the same influence to all objects that fall within the given buffer.

Page 16: Multicriteria Decision Analysis for Topological Routing Using

Methods for AnalysispgRouting: Finding the Path of Least Resistance

• Our simple line graph is transformed into a network topology, with connective nodes and edges, by issuing this command in the pgAdmin SQL Query tool:

SELECT assign_vertex_id('edges', 0.001, 'the_geom', 'gid');

• assign_vertex_id() is a function included with the pgRouting extension. This is explained in the tutorial.

• At this point we would also update the table by adding a numerical value to a column that we previously created when issued the CREATE TABLE statement.

UPDATE edges SET length = length(the_geom);

• Here we have created a length field to hold the length value of our network edge. This can be a cost. We would also use the same statement to update a “cost” column.

Page 17: Multicriteria Decision Analysis for Topological Routing Using

Methods for Analysis

pgRouting: Finding the Path of Least Resistance

• Now we can use any of the GIS functions provided by PostGIS and pgRouting.

• Dijkstra’s algorithm is a good single-source routing algorithm provided by pgRouting, so we can use that.

Page 18: Multicriteria Decision Analysis for Topological Routing Using

Methods for Analysis

pgRouting: Finding the Path of Least Resistance

• To simply run the query and get an answer in WKT (Well-Known-Text), you can issue this command in pgAdmin’s SQL Query tool:

SELECT gid, AsText(the_geom) AS the_geom

FROM dijkstra_sp('edges', 1, 8);

Page 19: Multicriteria Decision Analysis for Topological Routing Using

Results• Dijkstra’s results expressed in WKT:

• The “gid” is synonymous with “FID” in ArcGIS, and “the_geom” in this case is expressed in WKT. The numbers shown represent coordinate pairs that make up points along a polyline.

• This data can be programmatically extracted for use in ArcMap, but why? This is actually an OGC (Open Geospatial Consortium) standard.

• We can visualize this in another application besides ArcGIS, such as uDig or QuantumGIS, or even on the web using UMN Mapserver (there are more).

Page 20: Multicriteria Decision Analysis for Topological Routing Using

Results• Dijkstra’s results expressed visually in uDig:

Source

Target

Page 21: Multicriteria Decision Analysis for Topological Routing Using

Conclusions and Future Research

• It works.

• Look into “ZigGIS” – We can combine the power and familiarity of ArcGIS with storage and retrieval power of PostgreSQL/PostGIS.

• Think about the possibilities. Cheap multi-user editing without ArcGIS Server!

Page 22: Multicriteria Decision Analysis for Topological Routing Using

References• Berry, Joseph K. Beyond Mapping: Concepts, Algorithms, and Issues in GIS. Fort Collins: GIS World Inc, 1993.• Douglas, Korry, and Susan Douglass. PostgreSQL: The Comprehensive Guide to Building, Programming, and

Administering PostgreSQL Databases. Indianapolis: Sams Publishing, 2006.• Fischer, Manfred M. and Peter NijKamp, eds. Geographic Information Systems, Spatial Modelling and Policy

Evaluation. New York: Springer-Verlag, 1993.• Glasson, John and Tim Marshall. Regional Planning. New York: Routledge, 2007.• Hobbs, Benjamin F., and Peter Meier. Energy Decisions and the Environment: A Guide to the Use of Multicriteria

Methods. Boston: Kluwer Academic Publishers, 2003.• Holder, Jane and Donald McGillivray, eds. Taking Stock of Environmental Assessment: Law, Policy, and Practice.

New York: Routledge-Cavendish, 2007.• Malczewski, Jacek. GIS and Multicriteria Decision Analysis. New York: John Wiley & Sons Inc, 1999.• Mannino, Michael V. Database Design, Application Development, and Administration, 3rd Edition. New York:

McGraw Hill/Irwin, 2007.• Marriott, Betty Bowers. Practical Guide to Environmental Impact Assessment. New York: McGraw Hill, 1997.• Miller, Harvey J. and Shih-Lung Shaw. Geographic Information Systems for Transportation: Principles and

Applications. New York, 2001.• Openshaw, Stan, and Robert J. Abrahart, eds. GeoComputation. New York: Taylor & Francis, 2000.• O’Sullivan, David and David J. Unwin. Geographic Information Analysis. New York: John Wiley & Sons Inc, 2003.• Rana, Sanjay, ed. Topological Data Structures for Surfaces: An Introduction to Geographical Information Science .

Chichester: John Wiley & Sons Inc, 2004.• Rodrigue, Jean-Paul, Claude Comtois and Brian Slack. The Geography of Transport Systems. New York:

Routledge, 2006.• Weyant, John, ed. Energy and Environmental Policy Modeling. Boston: Kluwer Academic Publishers, 1999.• Zeiler, Michael. Modeling Our World: The ESRI Guide to Geodatabase Design. New York: Environmental

Systems Research Institute, 1999.

Page 23: Multicriteria Decision Analysis for Topological Routing Using

Questions?