[postgis-users] Shortest path around polygons

tommy408 tommytomorow at msn.com
Thu Jun 25 09:37:49 PDT 2009


Thank you for your help.
If my polygon table is huge,  it would have to consider all the polygon in
space?  Is there a way I can narrow down only polygons are that in the way
between point A and B?



Suhr, Ralf wrote:
> 
> 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
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> 
> 

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




More information about the postgis-users mailing list