May 2017
Beginner to intermediate
328 pages
7h 17m
English
All the routing algorithms that we have seen have an option to specify whether a graph is directed or non-directed. An edge of non-directed graphs can be travelled from source to target and from target to source with the same cost. When the cost of traveling in both directions is different, or an edge is not traversable in one of the directions, then a network is directed.
In pgRouting, cost and reverse cost is used for defining the rules of traveling in both directions (source to target and target to source). So, whenever telling the algorithms to assume a directed network is used, the reverse cost should be provided.
Basically, the rules are as follows:
Read now
Unlock full access