[mapserver-users] OpenStreetMap + osm2pgsql = pgRouting

roshni.spain roshni.aruna at gmail.com
Mon May 17 17:13:42 EDT 2010


Hi all,
First of all, my apologies for placing this post abour pgRouting in this
post, but i sincerely did not find any other appropriate forum to post this
issue. 

Well, the scenario is the following:

I have got OSM data that has been inserted into PostGIS using osm2pgsql. I
have used MapServer to interact with my map through OpenLayers and this
works perfectly fine. 

On the other side, I need to use pgRouting to use the algoritms of
shortest_path or dijkstra to find a route between A and B and show it with
OpenLayers. I have managed to do this with OpenLayers, so i know that if the
algorithms return any result, the calculated rout shows properly in my
browser. BUT, my problem is that in most of the cases, my algoritms do not
return any result... lets say maybe 80-90% of the times there is no route
calculated. What can i do ??

My geom table has got the values x1,y1,x2,y2,source,target filled for all
the rows. 

The columns source and target are filled using this:
SELECT assign_vertex_id('planet_osm_line', 5, 'the_geom', 'gid');   

As for the columns x1,y1,x2,y2, these are filled using this:
SELECT astext(StartPoint(way)) as startpoint from planet_osm_line => used to
fill up x1, y1
SELECT astext(EndPoint(way))as endpoint from planet_osm_line => used to fill
up x2, y2

I really dont know where the problem could be, as all the rows are filled up
and the data seem correct...

Please help !!! 
Thank you !
-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/OpenStreetMap-osm2pgsql-pgRouting-tp5067095p5067095.html
Sent from the Mapserver - User mailing list archive at Nabble.com.


More information about the mapserver-users mailing list