[pgrouting-users] problem with azimuth()

Valeria Muñoz valemunoz at gmail.com
Mon Apr 6 10:45:53 EDT 2009


Hi

After a while I returned to my work pgrouting. I'm trying to define whether
a user should turn right or left with the function azimuth .

My problem is: does not work:) I'm doing something wrong.

My query:

A-SELECT azimuth(startpoint(the_geom),endpoint(the_geom)) as azimuth from
calle where gid = 4390
B-SELECT azimuth(startpoint(the_geom),endpoint(the_geom)) as azimuth from
calle where gid = 7326
C-SELECT azimuth(startpoint(the_geom),endpoint(the_geom)) as azimuth from
calle where gid = 4392
D-SELECT azimuth(startpoint(the_geom),endpoint(the_geom)) as azimuth from
calle where gid = 4402

After obtaining the results:
I compare A con B if the result is <=-1=turn left >=1 tunr right
I compare B con C if the result is <=-1=turn left >=1 tunr right
I compare C con D if the result is <=-1=turn left >=1 tunr right


can someone please guide me?
RG
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20090406/0cc74ddd/attachment.html


More information about the Pgrouting-users mailing list