I'm looking for a way to create a direction arrow symbol on top of a line segment. Using PolylineAnalyzer I can get the direction of the line but how do I convert that to a arrow symbol?
Page 1 / 1
Hi,
Supposing that your requirement is to create a triangle polygon as the arrowhead symbol.
After calculating the azimuth of the input line segment:
- create the end node point of the input line as top vertex of a isosceles triangle which points to north direction (Snipper),
- extract its coordinate (x, y) as attributes (CoordinateExtractor),
- calculate coordinates of the left/right vertices of bottom of the triangle based on the (x, y) of the top vertex (AttributeCreator),
- create a triangle polygon from the 3 coordinates (two VertexCreators and LineCloser),
- rotate it by proper angle around the (x, y) of the top vertex (Rotator).
Takashi