Calculates, for each vertex in a graph, the closest destination
among several possible destinations as well as the distance to this
destination.
Using this function will be faster than doing an equivalent
calculation using ST_ShortestPathLength.
ST_Accessibility is implemented as follows: The
graph is reversed, and Dijkstra's algorithm is run from each
destination vertex. This is much more efficient than running
Dijkstra's algorithm from each vertex to each destination and
taking the minimum distance.
Input parameters
Variable
Meaning
INPUT_EDGES
Table containing integer columns EDGE_ID, START_NODE and END_NODE; and optionally a weight column w (if the graph is weighted) and/or an edge orientation column eo (required if global orientation is not undirected)
o
Global orientation string: directed, reversed or undirected
eo
Edge orientation column name indicating individual edge orientations: 1 (directed), -1 (reversed) or 0 (undirected); required if global orientation is directed or reversed
Find an equivalence between
ST_ShortestPathLength called on one
source and ST_Accessibility called on one destination. Hint:
Think about reversing the graph.