[mapserver-users] optimal path between two points.

Daniel Kastl orkney at gmx.de
Tue Feb 3 19:18:45 EST 2009


Hi,

I agree with Steve, that you better ask this question in the pgRouting
forum or on their list.

Looking at your screenshot my first thought was that your network
topology is not correct, maybe you took a too high "tolerance" value
when you assigned source and target IDs (units meter instead of degree).

But let's discuss this better here
http://pgrouting.postlbs.org/discussion or here
http://lists.postlbs.org/mailman/listinfo/pgrouting-users

Daniel


Valeria Muñoz schrieb:
> example
>  
> the query is optimal path between 887 y 852. :
> SELECT rt.gid, AsText(rt.the_geom) AS wkt,
>                    length(rt.the_geom) AS length, calle.gid
>                 FROM calle,
>                     (SELECT gid, the_geom
>                         FROM dijkstra_sp_delta(
>                             'calle',
>                             887,
>                             852,
>                             3000)
>                      ) as rt
>                 WHERE calle.gid=rt.gid;
> result:
>  
> "gid";"wkt";"length";"gid"
> 4389;"MULTILINESTRING((-71.1951327440651
> -30.5911350429583,-71.1957462426904
> -30.5912128948402,-71.1957861853043 -30.591219747929,-71.1958400125164
> -30.591211719682))";0.000713367403530106;4389
> 4603;"MULTILINESTRING((-71.1939954028678
> -30.5921681162637,-71.1939834234752
> -30.5922241673576,-71.1938231446269
> -30.5925509466888))";0.000421286769021393;4603
> 4331;"MULTILINESTRING((-71.1950174992082
> -30.5919506007811,-71.1950526139385
> -30.5916919152203))";0.000261057969957178;4331
> 4608;"MULTILINESTRING((-71.1938231446269
> -30.5925509466888,-71.1937648360013
> -30.5926358138883))";0.00010296765211197;4608
> RG
>  
> 2009/2/3 Stephen Woodbridge <woodbri at swoodbridge.com
> <mailto:woodbri at swoodbridge.com>>
>
>     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> <mailto: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
>         <mailto:mapserver-users at lists.osgeo.org>
>         http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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