[Cartoweb-users] pgdijkstra

guillaume champlong goutosig at yahoo.fr
Thu Aug 24 03:42:03 EDT 2006


Hi list,
  
  I had problems with the data relative to the plugin routing, I did not  manage to get  the "the_geom" and "txt" columns in my  vertices_table. The names of my towns were stored in a table (let's  call it "town") with a geometry exactly corresponding to the nodes of  the roads_table.
  Finally i fixed it like this:
  
  SELECT addGeometryColumn( ' vertices_table', ''the_geom'', -1, ''POINT'', 2) ;
  
  UPDATE vertices_table SET the_geom = NULL ;
  
  UPDATE vertices_table SET the_geom = startPoint(geometryn(m.the_geom, 1)) FROM geom_table  m WHERE geom_id = m.source_id ;
  
  UPDATE vertices_table SET the_geom = endPoint(geometryn(m.the_geom, 1))  FROM geom_table m where geom_id = m.target_id AND  vertices_table.the_geom IS NULL ;
  
  then just need to add a column and joint with the table "town"
  
  ALTER TABLE geom_table ADD COLUMN txt varchar;
  
  UPDATE vertices_table SET txt=town.txt WHERE vertices_table.the_geom = town.the_geom ;
  
  hope this helps
  
  guillaume
  
 		
---------------------------------
 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/20060824/479d543c/attachment.html


More information about the Cartoweb-users mailing list