Suggestions for an efficient way to determine the local bearing of an arbitrary location along a line. Local bearing is the azimuth angle of a given point to the next vertex in the line.
Bonus points if it iterates easily.
Suggestions for an efficient way to determine the local bearing of an arbitrary location along a line. Local bearing is the azimuth angle of a given point to the next vertex in the line.
Bonus points if it iterates easily.
Best answer by gio
Hi,
Like this?
1. Use chopper on polyline.
2. extract start and end vertices, and name them accordingly. I used S_x,S_y\\
and E_x,E_y.
3. calculate angle.
4. vertexcereator replace mode for startpoints.
5. vertexcreator with following vlaues
x= @Value(S_x)+@Evaluate(@Value(OFFSET)*@cos((@Value(Hoek_)/180)*$(Pi)))
y= @Value(S_y)+@Evaluate(@Value(OFFSET)*@sin((@Value(Hoek_)/180)*$(Pi)))
Offset variable i created to give lenght to a "bearingpointer" (arrow/vector)
Set lenght to you desire.
Now u got your bearing.
(nb. if you use Azimuthcalculator you wont need to extracxt endcoordinates.)
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.