Database Reference
In-Depth Information
Chapter 6. Working with pgRouting
In this chapter, we will cover:
• Startup - Dijkstra routing
• Loading data from OpenStreetMap and finding the shortest path using A*
• Driving distance/service area calculation
• Calculating demographics using driving distance
• Extracting the centerlines of polygons
Introduction
Sofar,wehaveusedPostGISasavectorandrastertool,usingrelativelysimplere-
lationships between objectsandsimplestructures. Inthischapter,wewillreviewan
additionalPostGIS-relatedextension: pgRouting .pgRoutingallowsustointerrogate
graph structures in order to answer questions, such as "What is the shortest route
fromwhereIamtowhereIamgoing?"Thisisadomainheavilyoccupiedbytheex-
isting web APIs (such as Google, Bing, MapQuest, and others) and services, but it
canbebetterservedby"rollingourown"servicesformanyusecases.Whichcases?
Itmightbeagoodideatocreateourownservicesinsituationswherewearetrying
toanswerquestionsthataren'tansweredbytheexistingservices,suchaswhenthe
data available to us is better or more applicable, or when we need or want to avoid
the Terms of Service conditions for these APIs.
Search WWH ::




Custom Search