[postgis-users] Shortest path around polygons

Suhr, Ralf Ralf.Suhr at itc-halle.de
Thu Jun 25 07:06:34 PDT 2009


Solving your problem is not realy hard but time expensive.
 - install pgRouting
 - create one table for the polygons
 - create one table for holding linestrings
 - write a function that:
   - build all possible lines in one polygon (makeline from cross join points from polygon)
   - remove lines wich are outside the polygon
   - write lines with extra attribute polygon_id in the linestring table
 - run add_vertices (pgRouting function)
 - create temporary table for your "two points" (linestring geometry)
 - rerun the function for creating linstrings with the two points and all polygon points
 - finaly run shortest_path( join two tables )


-----Ursprüngliche Nachricht-----
Von: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] Im Auftrag von tommy408
Gesendet: Donnerstag, 25. Juni 2009 15:35
An: postgis-users at postgis.refractions.net
Betreff: [postgis-users] Shortest path around polygons



I'm really new to PostGIS.  I need to solve this problem.  Find the shortest path around polygons from point A to point B.  

Here is a better description:  http://alienryderflex.com/shortest_path/

How can I do it with PostGIS.  Or if you can give me some hints to narrow my search.

Thank you.
-- 
View this message in context: http://www.nabble.com/Shortest-path-around-polygons-tp24203378p24203378.html
Sent from the PostGIS - User mailing list archive at Nabble.com.

_______________________________________________
postgis-users mailing list postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users



More information about the postgis-users mailing list