Skip to main content
Question

Line Direction to Arrow

  • April 22, 2015
  • 1 reply
  • 94 views

dos_gis
Contributor
Forum|alt.badge.img+3
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? 
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

takashi
Celebrity
  • April 23, 2015
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