[pgrouting-users] directions problem

Valeria Muñoz valemunoz at gmail.com
Thu Feb 12 09:08:57 EST 2009


hi Daniel, thanks for the link..

I did the following:

*UPDATE calle SET to_cost=length(the_geom), reverse_cost=length(the_geom);*
**

*UPDATE calle SET reverse_cost=reverse_cost + 1000000 WHERE oneway!=0 ,
oneway!=0 are one way streets.*
my query:


SELECT edge_id as gid,cost as length FROM shortest_path_astar('SELECT gid AS
id,source::int4, target::int4, to_cost::double precision as cost,
reverse_cost::double precision, x1,y1,x2,y2 FROM
calle',3412,3411,false,true)**

this do not works 100%, with some street works with others no...

 I am missing something?

RG

2009/2/11 Daniel Kastl <kastl at orkney.co.jp>

> So I guess pgRouting doesn't know that there is a one way street.
> You might want to read this:
> http://pgrouting.postlbs.org/wiki/OneWayStreets
>
> Daniel
>
>
> Valeria Muñoz schrieb:
>  > HI!!
> >
> >       I have a little problem with my routing, the best path from A to
> > B do not respect the traffic direction.
> > attached image.
> >
> > please check in the example vicente perez rosales street
> >
> > Query
> >
> > rt.gid,rt.the_geom AS tg, 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', 3414, 3406, 3000) ) as rt
> > WHERE calle.gid=rt.gid;
> >
> >
> > RG
> >
> > ------------------------------------------------------------------------
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Pgrouting-users mailing list
> > Pgrouting-users at lists.postlbs.org
> > http://lists.postlbs.org/mailman/listinfo/pgrouting-users
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20090212/e5ff2bfb/attachment.html


More information about the Pgrouting-users mailing list