May 2017
Beginner to intermediate
328 pages
7h 17m
English
Driving distance functions use the Dijkstra algorithm to find all the edges that have the cumulative costs less or equal to the specified value. Our ways dataset has some properties that can be used to perform sensible driving distance analysis.
Let's first find the edges that are no farther than 1000 metres from Vienna's central train station:
select * from pgr_drivingDistance('select gid as id, source, target, length_m as cost from pgr.ways', 120829, 1000);
Next, let's see how far we can get from the station in five minutes:
select * from pgr_drivingDistance('select gid as id, source, target, cost_s as cost from pgr.ways', 120829, 300);
In both cases, the output is a dataset with the following columns: seq, node,
Read now
Unlock full access