Driving distance/service area calculation
Driving distance (pgr_drivingDistance
) is a query that calculates all nodes within the specified driving distance of a starting node. This is an optional feature compiled with pgRouting; so if you compile pgRouting yourself, make sure that you enable it and include the CGAL library, a required dependency for pgr_drivingDistance
.
Driving distance is useful when "user sheds" are needed that give realistic driving distance estimates, for example, for all customers within 5 miles of driving, biking, or walking distance. These estimates can be contrasted with buffering techniques, which assume no barrier to travelling and are useful for revealing the underlying structures of our transportation networks relative to individual locations.
Getting ready
We will load the same dataset that we used in the Startup – Dijkstra routing recipe. Refer to this recipe to import data.
How to do it...
In the following example, we will look at all users within the distance...