[Cartoweb-users] Dijkstra - Postgis

guillaume champlong goutosig at yahoo.fr
Tue Sep 12 12:13:35 EDT 2006


hi Rodrigo,
  
  I am not sure to understand exactly what you want, but here is what I can tell you:
  
  You can not work with two vertices having the same source and the same  target, if that is what you mean by "double vertices". If you do so,  the dijkstra algorithm won't work.

  Otherwise, every graph has to be weighed (cost column filled); the  first boolean parameter indicates whether the graph is oriented or not,  and the second one whether there is a reverse cost to take into account  in the case when the graph is oriented.
  
  hope this helps
  
  guillaume
  
Rodrigo <rlo1977 at gmail.com> a écrit :  
  Hi list,
  I  have a situation in the use of the algorithm of Dijkstra in the  database - Postgresql using the Postgis extension, with the library of  the Dijsktra, is mounted the graph with the streets of a city, is  mounted all the edges and vertices, exist vary functions amongst them  of the shortest_path, are normally functioning and the lesser way for  balance, where I have I also cost associated the passage of the edge  and a cost reverse what the against-hand of the track could be  considered, with the following signature of sql; SELECT * FROM  shortest_path('sql text ', source_id, target_id, false, false);, where  it false, it false, it means not guided and not weighed, and they will  be true, true is considered with cost and that it has cost for the  passage reverse, it would like to know if somebody already worked with  these functions, so that I can make a mixing graph, creating double  vertices where it has double hand and an only vertex where it has only  hand or if I
 can make this type of orientation by means of cost of the  Edge. Grateful  
   
  Olá pessoal
  Tenho  uma situação na utilização do algoritmo de menor caminho Dijkstra na  base de dados - Postgresql utilizando a extensão Postgis, com a  biblioteca do Dijsktra, é montado o grafo com o arruamento de uma  cidade, é montado todas as arestas e vértices, existem varias funções  dentre elas a do menor caminho geográfico, está funcionando normalmente  e a menor caminho por ponderação, onde eu tenho um custo associado a  travessia da aresta e um custo reverso também o que poderia ser  considerado a contra-mão da pista, com a seguinte assinatura de sql;  
  SELECT  * FROM shortest_path('sql text', origem_id, alvo_id, false, false);,  onde false, false, significa não orientada e não ponderada, e se forem  true, true é considerado com custo e que há custo para a travessia  reversa, gostaria de saber se alguém já trabalhou com estas funções,  para que eu possa fazer um grafo misto, criando vértices duplos onde há  mão dupla e um único vértice onde há mão única ou se posso fazer esse  tipo de orientação por meio de custo da Aresta. Grato  

-- 
Rodrigo Luiz Oliveira   _______________________________________________
Cartoweb-users mailing list
Cartoweb-users at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/cartoweb-users


 		
---------------------------------
 Découvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet ! Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos expériences. Cliquez ici. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20060912/c14b827a/attachment.html


More information about the Cartoweb-users mailing list