shootingstar (#18) - First edge doesn't respect the one way restriction (#308) - Message List
Hi there. I have a problem with the algorithm shortest_path_shooting_star.
The image hosted by imageshack will help me:
http://img198.imageshack.us/img198/7125/errorei.jpg
Look at the image on the left Via fiano and Via corio. I want to go from Via Fiano to Via Corio. this is the query i do :
##for correct order result
set enable_hashjoin=false;
set enable_mergejoin=false;
##shooting_star query
SELECT ".TABLE.".*, AsText?(".TABLE.".the_geom) AS wkt FROM ".TABLE.", shortest_path_shooting_star('SELECT gid as id, source, target, cost, reverse_cost,
x1, y1, x2, y2, rule, to_cost FROM ".TABLE."', ".$startEdgegid?.", ".$endEdgegid?.", true, true) as rt
WHERE ".TABLE.".gid=rt.edge_id;
this is result:
gid|vertex|edge_id|cost
5494;9236;5494;90.092508879762
5503;8058;5503;39.4141794163281
5509;5427;5509;94.3764538381396
As you see, the algorithm does not respect the one way restriction of first edge. Instead the reverse path works well: http://img132.imageshack.us/img132/2015/errorpi.jpg
If i make turn restricion in gid 5503 rule 5494 to_cost=1000 doesn't solve this situation. Thanks for any advice
-
Message #1153
edit 1: the turn restriction solve the problem, but i can't find all one way on the map and set manually to_cost=1000 rule="one_way street gid with turn restriction" There is a better way to do it? Thanks!!!
carlofrancesco10/21/09 18:48:47 (13 months ago) -
Message #1155
look at this new image: http://img132.imageshack.us/img132/8185/error2ia.jpg
edge_id|vertex_id|cost|street
4311;790;1001000138.79372;790;"RE G. (VIA)"
4150;501;61.479488767088;501;"PACCHIOTTI G. (VIA)"
6114;856;1001000142.27532;856;"LIONETTO (STR. DEL)"
it takes a cost of 1001000138 !! What i can do? Thanks
carlofrancesco10/21/09 22:11:14 (13 months ago)-
Message #1172
Hi,
First of all, I would like to see your data for one way (and neighbour) edges and the query your trying to execute.
And the second note - hight reverse (or plain) cost doesn't mean that an edge is not reachable - you can reach it with this high cost when there is no other option. That's why I would like to see your data - to make sure that everything is OK with other edges.
Anton.
anton10/26/09 10:07:41 (13 months ago)
-
-
Message #1157
Hi carlos ! I have similar problem, but with the last edge. I have tried everything and I could not fix it. I will continue investigating, if I find the solution you notice. If you find it please write the solution.
bye.. good luck !!
dalberione10/22/09 23:23:34 (13 months ago)-
Message #1158
Yes with last edge too... I think is a bug. Should we open a ticket about it?
i think is related to the algorithm that stops to consider the edge cost on the first and last edge...My pgrouting version is the latest svn version.
carlofrancesco10/23/09 00:01:38 (13 months ago)-
Message #1159
Yes, we should open a ticket. I've researched everywhere and have not found the solution. Now I'm mixing with shortest_path algorithm with shortest_path_shooting_star, but not good !!
Do you generate you the ticket? because my English is not very good :(
dalberione10/23/09 00:10:56 (13 months ago)-
Message #1160
ok
carlofrancesco10/23/09 00:34:33 (13 months ago)-
Message #1161
Please, notify me when you have news..
dalberione10/23/09 01:12:00 (13 months ago)-
Message #1162carlofrancesco10/23/09 01:28:36 (13 months ago)
-
-
-
-
-
-
Message #1174
Removing the "directed connection" and working only with costs query is:
set enable_hashjoin=false;set enable_mergejoin=false;
SELECT ".TABLE.".*, AsText?(".TABLE.".the_geom) AS wkt FROM ".TABLE.", shortest_path_shooting_star('SELECT gid as id, source, target, cost, reverse_cost,
x1, y1, x2, y2, rule, to_cost FROM ".TABLE."', ".$startEdgegid?.", ".$endEdgegid?.", false, true) as rt
WHERE ".TABLE.".gid=rt.edge_id;
Result is not same but still not correct.
carlofrancesco10/26/09 18:13:07 (13 months ago)-
Message #1175
look at this strange thing: http://img245.imageshack.us/img245/4746/exampleq.jpg
routing works well in the first 2 and last images, doesn't works in the 3rdcarlofrancesco10/26/09 19:27:25 (13 months ago) -
Message #1176
look at this strange thing: http://img245.imageshack.us/img245/4746/exampleq.jpg
routing works well in the first 2 and last images, doesn't works in the 3rdcarlofrancesco10/26/09 19:27:31 (13 months ago)
-