[Cartoweb-users] dijkstra
Sylvain Pasche
sylvain.pasche at camptocamp.com
Mon Jan 16 13:27:20 EST 2006
Hi Raphael,
There is a constraint on the identifiers which can be used as vertex identifier with pgdijkstra:
They should be numbers which should be less that the total number of nodes you have in you graph (plus a small value).
(This constrains exists for performance reasons).
To get around this constrain, there is the create_graph_tables() function you can use (See the README for an example).
This "issue" should be better documented, I admit.
Regards,
Sylvain
Le mardi 10 janvier 2006 à 15:10 +0100, Eggenschwiler Raphael a écrit :
> Hi everyone !
>
> I try to use this pgdijkstra on my data with :
>
> SELECT arc_num_nod_src as "source",arc_num as "id",arc_num_nod_des as
> "target",arc_cost as "cost" FROM TAB_ARC;
>
> source id target cost
> 0 6259 4769 0
> 4769 6260 4770 0
> 4770 6261 4771 0
> 4771 6262 4772 0
> 4772 6263 4773 0
> 0 6264 4775 0
> 4775 6265 4776 0
> 4776 6266 4777 0
> 4777 6267 4778 0
> 4778 6268 4779 0
> 4779 6269 4780 0
> 4780 6270 4781 0
> 0 6271 4783 0
> 4783 6272 4784 0
> 4784 6273 4785 0
> 4785 6274 4786 0
> 4786 6275 4787 0
> 4787 6276 4788 0
> 4788 6277 4789 0
> 4789 6278 4790 0
> 0 6279 4792 0
> 4792 6280 4793 0
>
> But when I try this one :
>
> select * from shortest_path('SELECT arc_num_nod_src as
> "source",arc_num as "id",arc_num_nod_des as "target",arc_cost as
> "cost" FROM TAB_ARC',4769,4770,false,false);
>
> I become this message :
>
> ERROR: Error computing path: Source vertex not found
>
> Can someone help me ??
>
> _______________________________________________
> Cartoweb-users mailing list
> Cartoweb-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/cartoweb-users
More information about the Cartoweb-users
mailing list