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
- 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 | TEXT |
Edges SQL as described below. |
| Root vid | BIGINT |
Identifier of the root vertex of the tree. |
| Root vids | ARRAY[ANY-INTEGER] |
Array of identifiers of the root vertices.
|
| distance | FLOAT |
Upper limit for the inclusion of a node in the result. |
Where:
| ANY-INTEGER: | SMALLINT, INTEGER, BIGINT |
|---|---|
| ANY-NUMERIC: | SMALLINT, INTEGER, BIGINT, REAL, FLOAT |
Inner Queries¶
Edges SQL¶
| Column | Type | Default | Description |
|---|---|---|---|
id |
ANY-INTEGER | Identifier of the edge. | |
source |
ANY-INTEGER | Identifier of the first end point vertex of the edge. | |
target |
ANY-INTEGER | Identifier of the second end point vertex of the edge. | |
cost |
ANY-NUMERICAL | Weight of the edge (source, target) |
|
reverse_cost |
ANY-NUMERICAL | -1 | Weight of the edge (
|
Where:
| ANY-INTEGER: | SMALLINT, INTEGER, BIGINT |
|---|---|
| ANY-NUMERICAL: | SMALLINT, INTEGER, BIGINT, REAL, FLOAT |
