[mapserver-users] optimal path between two points.

Stephen Woodbridge woodbri at swoodbridge.com
Tue Feb 3 15:05:16 EST 2009


This may be cause because you need to check the direction of the line 
segments before you create a linestring to pass to the client. If you 
route is something like

segment source target
   1        1     3
   2        4     3
   3        7     4
etc

route (1,2,4,3,7,4) or 1,3,3,4) depending on how you assemble it is not 
going to make sense.

Then segment 2 needs to be reversed so it goes from 3 to 4 and segment 3 
needs to be reverse also. so you get:

route (1,3,4,7).

Also this is not really a mapserver issues and you should probably pust 
this to the pgRouting list. It would alos help if you showed some of the 
intermediate results. When you show a image and the route is broken, 
most of us can look at the image and say "Yup, looks like the route is 
broken!" We do not see what data you got out of pgRouting, we do not 
know how that got passed to mapserver or OpenLayers, there are a lot of 
places that you can break things. We don't even know how data flows 
through your system or who/what is rendering the route part of the image.

-Steve

Valeria Muñoz wrote:
> hi..
>  
> I am back again with my problem pgrouting.. I followed a little tutorial 
> works perfectly with the shapefile from the example, but to use mine the 
> result is not expected, generating lines are not continuous, I think I 
> missing some coordinates or something to work with my shapefile.
>  
> attached image.
>  
> please help!!..
> 
> 2009/1/19 Valeria Muñoz <valemunoz at gmail.com <mailto:valemunoz at gmail.com>>
> 
>     Hi
>      
>     I would like to implement the service "optimum path between 2
>     points," can someone help me to be able to implement it?. The
>     general idea is that a user picks a point A and point B and a
>     display on the map the best route to get from point A to B.
>      
>     RG...
> 
> 
> 
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users



More information about the mapserver-users mailing list