-
-
Notifications
You must be signed in to change notification settings - Fork 386
Closed
Description
CREATE VIEW four_edges AS
SELECT * FROM edges WHERE id IN (1, 4, 10, 14);
Using the sample data of the documentation
Setting the point to be on vertex 7 (aka the source of edge 10):
7 (p) --------> 8 ---------------> 9
Query:
SELECT * FROM pgr_withPoints(
$$SELECT id, source, target, cost, reverse_cost FROM four_edges$$,
$$SELECT 10 AS edge_id, 0::float AS fraction $$,
-1, 9, true);
Results:
seq | path_seq | node | edge | cost | agg_cost
-----+----------+------+------+------+----------
(0 rows)
Expected results:
seq | path_seq | node | edge | cost | agg_cost
-----+----------+------+------+------+----------
1 | 1 | -1 | 10 | 1 | 0
2 | 2 | 8 | 14 | 1 | 1
3 | 3 | 9 | -1 | 0 | 2
(3 rows)
Similar situation happens with all the withPoints functions:
- pgr_withPointsKSP
- pgr_trspVia_withPoints
- pgr_withPoints
- pgr_withPointsCost
- pgr_withPointsCostMatrix
- pgr_withPointsDD
- pgr_withPointsVia