You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem
The function pgr_withPoints does sometimes not output the correct cost. If a POI is located on an edge that is being traversed in the shortest path, the cost from that POI to the end of the node is added on top of the current edge cost.
To Reproduce
Let's produce the most basic graph possible: only one edge with cost 10:
CREATE TEMPORARY TABLE edge_table (id integer, source integer, target integer, cost float);
INSERT INTO edge_table VALUES (1, 10, 11, 10.0);
Problem
The function pgr_withPoints does sometimes not output the correct cost. If a POI is located on an edge that is being traversed in the shortest path, the cost from that POI to the end of the node is added on top of the current edge cost.
To Reproduce
Let's produce the most basic graph possible: only one edge with cost 10:
Further, we need a single POI on that edge:
When performing a shortest path query from node 10 to 11, I expect the cost to be 10:
However, the cost is calculated as 14 (obviously 10 + (10 * (1 - 0.6))):
The agg_cost is then correct again.
Workaround
When the POI query ignores POI 20, the shortest path is caluclated as expected:
Result:
Platform/versions
The text was updated successfully, but these errors were encountered: