[pgrouting-users] Optimize routing - use new sew-devel-2_0 functions

Frédéric Bonifas fredericbonifas at gmail.com
Wed May 22 02:25:57 PDT 2013


Hello,

I have begun using PgRouting 3 months ago for pedestrian routing. So I
don't use reverse_cost nor tun restrictions.

I have written my own wrapper in order to :
* set the start and end points as geographic points, the wrapper finds
the nearest edge, splits it in two parts and create a temporary vertex
(that will be used as start or stop vertex)
* compute the route with the "shortest_path" function
* output the route as a GeoJSON with additional information like the
total legnth of the route/

It works fine for what I want but it is slow, especially on big
graphs. I guess this is partially because of the use of the Dijkstra
algorithm. I would like to improve that.

With the recent developments around the sew-devel-2_0 branch, I would
like to use another routing algorithm. I am thinking of bidirectional
A*. To adapt my wrapper :
* would bidirectional A* be a good choice in my case ?
* is there a function in the sew-devel-2_0 branch to find the nearest
edge from a geographic point, split it in two parts and union this to
the graph for the routing ? I have looked here but I don't find this :
https://github.com/pgRouting/pgrouting/blob/sew-devel-2_0/src/common/sql/pgrouting_matching.sql
Otherwise, I will adapt my wrapper.
* is it good to output a GeoJSON in my wrapper as I do, or is there a
better way to go ?

Thanks a lot for your ideas

Best

--
Frédéric Bonifas
+33672652807 skype:fredericbonifas


More information about the Pgrouting-users mailing list