Hello,<br><br>I create my maps using GPSmapedit then convert it to shape files using cgpsmapper. Finally the data is loaded into pgsl using shp2pgsql.<br><br>The problem I'm facing is that I cannot use the shortest_path function (from Djikstra by Cartoweb) as my polyline contains internal intersections. Short of manually splitting up all my polylines at intersections, how can I ensure that the shortest_path function would work with internal intersections?
<br><br>FYI, the line shapefile output by cgpsmapper does not contain source_id, target_id or edge_id. This is handled quite well by the assign_vertex_id function for roads which intersects at the beginning and end nodes. But assign_vertex_id does not work with roads that intersect in the middle.
<br><br>I'm thinking if I altered shp2pgsql to break linestrings at internal nodes, this would solve the routing problem. So if Road A with nodes (a,b,c) joins Road B with nodes (b,d), shp2pgsql would create 3 rows of data to allow the shortest_path function to work:
<br><br>1 Road A (a,b)<br>2 Road A (b,c)<br>3 Road B (b,d)<br><br>Am I approaching this problem from the wrong angle?<br><br>Thanks in advance for any help offered.<br><br>Noah<br><br><br>