<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt">Dear Professionals,<br>It's been a while we are using PostGIS to store our Geometry information in our Postgress database. We have developed vertex-to-vertex routing ourselves using iGraph library. Yesterday I read about pgRouting and I am porting our current application to pgRouting. However, I faces some issues in using shooting start path finder.<br><br>We stored edges and vertices information in tables and for finding a graph route with turn restriction, we are calling following SQL script:<br><br>SELECT shortest_path_shooting_star( <br> 'SELECT e.id, <br> e.first as source, <br>
e.second as target, <br> ST_Length(e.geom) as cost, <br> st_x(st_pointn(e.geom, 1)) AS x1, st_y(st_pointn(e.geom, 1)) AS y1, <br> st_x(st_pointn(e.geom, 2)) AS x2, st_y(st_pointn(e.geom, 2)) AS y2, <br> (not connected)::boolean::int * 1000000 AS to_cost, <br> c.first AS rule <br> FROM edges e LEFT OUTER JOIN edge_connections c ON e.id = c.second <br> WHERE e.group_id = 0 order by e.id', <br>
1209560, 1209653, <br> true, false);<br><br>My inner subqery woud have following results:<br> id | source | target | cost | x1 | y1 | x2 | y2 | to_cost | rule <br>---------+---------+---------+----------------------+------------------+------------------+------------------+------------------+---------+---------<br> 1087134 | 926686 | 926687 | 2.3299 | 51.4675 | 35.728 | 51.4675 | 35.72805577
| | <br>.<br>.<br>.<br> 1209706 | 1039731 | 1039870 | 4.005 | 51.40828 | 35.7239 | 51.4082 | 35.7239 | 1000000 | 1209564<br>.<br>.<br>.<br><br><span>In the results, when a constraint exists, rule and to_cost would not be NULL. When a turn restriction exists, the results would be exactly like what specified in the docs (<a target="_blank" href="http://www.pgrouting.org/docs/1.x/shooting.html">http://www.pgrouting.org/docs/1.x/shooting.html</a>). </span><br><br>However, when I call the shortest_path_shooting_star function, results would not differ if a rule-and-to_cost exists or not. I have changed directed and <span class="n">has_reverse_cost</span> parameters but nothing happened. <br><br>I was wondering if you guys could help me in this matter. Any advice or even a clue would be very much appreciated.<br><div>Thanks,<br>* Roozbeh</div></div><br>
</body></html>