<div dir="ltr">Yes, that is something very similar to what I need to do, I already wrote a php code to check angels and slopes, but it was not accurate, it was more life "if else" code, I check the longlat for current segment with longlat for the previous one, I guess you didn't use the database for direction calculation(except for routing) am I right? Isn't steps 3 and 4 depends on your angel calculations? <br>
<br>I have the roads with two different languages, a road map like anyother road map I guess.<br><br><div class="gmail_quote">On Tue, Dec 30, 2008 at 3:17 AM, Stephen Woodbridge <span dir="ltr"><<a href="mailto:woodbri@swoodbridge.com">woodbri@swoodbridge.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">bdair2002 wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br>
I am developing an application using Pgrouting with Postgis data, everything<br>
is fine, but now I am looking  to do something like Google directions guide,<br>
where it tells you turn left or right, I am wondering if this feature is a<br>
built-in feature in Pgrouting or Postgis.<br>
<br>
Regards<br>
</blockquote>
<br></div>
No this is not a feature that is part of either.<br>
<br>
I have implemented a directions explicator, but it is somewhat specific to the data that you have, as you need to know what column(s) contain the road names, if you have signage information then you need to know how to link to that. If you want to be able to explicate in multiple languages, then you probably need to consider supporting multiple languages each in a separate table the you can select from when you generate the languages.<br>

<br>
The algorithm is pretty straight forward as the you currently get a list of segments that make up the route. Then you need to:<br>
<br>
analyze each segment and<br>
1) check to see if you want to join it with the previous segment because the road name matches<br>
2) check the angle that it makes with the last segment to determine right, left, straightness of turn<br>
3) compute the compass heading for the segment<br>
4) determine if you have signage<br>
5) based on these, determine if you are read to explicate and which predefined instruction you need to explicate an instruction<br>
6) loop through all segments<br>
<br>
For a demo of this you can try:<br>
<a href="http://imaptools.com/leaddog/routing/dd.html" target="_blank">http://imaptools.com/leaddog/routing/dd.html</a><br>
<br>
Zoom into a city in one of the yellow areas, set a start and end point and click [calculate route] button. The driving directions should show below the button if it was successful, be patience the routing is running on a 333MHz box.<br>

<br>
-Steve<div><div></div><div class="Wj3C7c"><br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
</div></div></blockquote></div><br></div>