Driving Distance - Category¶
pgr_drivingDistance - Driving Distance based on Dijkstra’s algorithm
pgr_primDD - Driving Distance based on Prim’s algorithm
pgr_kruskalDD - Driving Distance based on Kruskal’s algorithm
Post pocessing
pgr_alphaShape - Alpha shape computation
Proposed
Warning
Proposed functions for next mayor release.
They are not officially in the current release.
They will likely officially be part of the next mayor release:
The functions make use of ANY-INTEGER and ANY-NUMERICAL
Name might not change. (But still can)
Signature might not change. (But still can)
Functionality might not change. (But still can)
pgTap tests have being done. But might need more.
Documentation might need refinement.
pgr_withPointsDD - Proposed - Driving Distance based on pgr_withPoints
Calculate nodes that are within a distance.
Extracts all the nodes that have costs less than or equal to the value distance.
The edges extracted will conform to the corresponding spanning tree.
Edge \((u, v)\) will not be included when:
The distance from the root to \(u\) > limit distance.
The distance from the root to \(v\) > limit distance.
No new nodes are created on the graph, so when is within the limit and is not within the limit, the edge is not included.
Parameters¶
Parameter |
Type |
Description |
---|---|---|
|
Edges SQL as described below. |
|
Root vid |
|
Identifier of the root vertex of the tree. |
Root vids |
|
Array of identifiers of the root vertices.
|
distance |
|
Upper limit for the inclusion of a node in the result. |
Where:
- ANY-NUMERIC:
SMALLINT
,INTEGER
,BIGINT
,REAL
,FLOAT
Inner Queries¶
Edges SQL¶
Column |
Type |
Default |
Description |
---|---|---|---|
|
ANY-INTEGER |
Identifier of the edge. |
|
|
ANY-INTEGER |
Identifier of the first end point vertex of the edge. |
|
|
ANY-INTEGER |
Identifier of the second end point vertex of the edge. |
|
|
ANY-NUMERICAL |
Weight of the edge ( |
|
|
ANY-NUMERICAL |
-1 |
Weight of the edge (
|
Where:
- ANY-INTEGER:
SMALLINT
,INTEGER
,BIGINT
- ANY-NUMERICAL:
SMALLINT
,INTEGER
,BIGINT
,REAL
,FLOAT
Result columns¶
Returns set of (seq, depth, start_vid, pred, node, edge, cost, agg_cost)
Parameter |
Type |
Description |
---|---|---|
|
|
Sequential value starting from \(1\). |
|
|
Depth of the
|
|
|
Identifier of the root vertex. |
|
|
Predecessor of
|
|
|
Identifier of |
|
|
Identifier of the
|
|
|
Cost to traverse |
|
|
Aggregate cost from |
See Also¶
Indices and tables