|
There are 2 solutions which can solve your
problem. I still use my table name, roads, roads_edges, and roads_ vertices. 1. Go to roads_ vertices table, select
id from roads_vertices where geom_id=4769 or geom_id= 4770; It will return your two
rows. Use returned two ids to replace
4769 and 4770 in your command. 2. Instead of using shortest_path
function, use shortest_path _as_geometry. This function takes node id
from Table roads. So 4769 and 4770 will works. Of cause, you need to make
change to satisfy shortest_path _as_geometry signature. And the return is
different. As function name indicates, it will return line geometry with edge
ID. Fay -----Original Message----- I believe there is ID
miss up. If you run sample data
step by step, there are 3 tables roads, roads_edges, and roads_ vertices. In table roads, souce_id
and target_id are different with roads_edges. But the two ids (same node, but
it has two different ID in table roads and roads_edges) are connected by table
roads_ vertices. In roads_ vertices, id is the source/target used in roads-edges, and gid is
the id of same node used in tables roads. Shortest_path asks for id
from roads_edges. What you passed are node ID from Table roads. It is why
program cannot find the path. Fay -----Original Message----- Hi everyone ! |
_______________________________________________ Cartoweb-users mailing list [email protected] http://lists.maptools.org/mailman/listinfo/cartoweb-users
