Skip to main content
Question

line order on clockwise orientation

  • December 11, 2019
  • 5 replies
  • 37 views

alc33
Contributor
Forum|alt.badge.img+10
  • Contributor

Hi!

I have lines connected to a feature. I would like to give a number to my lines on clockwise orientation in relation to this feature.

Do you have an idea?

Thanks!

 

5 replies

Forum|alt.badge.img
  • December 11, 2019

I'm probably oversimplifying this but anyway. :-)

1. Calculate the angle of the lines.

 

2. Use a Sorter to sort on angle.

 

3. Use a Counter to give the lines their number.

bwn
Evangelist
Forum|alt.badge.img+26
  • Evangelist
  • December 11, 2019
danullen wrote:

I'm probably oversimplifying this but anyway. :-)

1. Calculate the angle of the lines.

 

2. Use a Sorter to sort on angle.

 

3. Use a Counter to give the lines their number.

Agree, only extra thing that will help is use custom hub transformer HorizontalAngleCalculator to get an angle attribute for Step 1


takashi
Evangelist
  • December 11, 2019

It might be hard to define the order generally unless you add some conditions. For example, how do you define the order of the lines in this case?


Forum|alt.badge.img
  • December 12, 2019
takashi wrote:

It might be hard to define the order generally unless you add some conditions. For example, how do you define the order of the lines in this case?

I'll answer that question at midnight. Is that 0.00 AM or 12.00 PM by the way..? ;-)


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • December 12, 2019

It may be overkill, but I tend to use the TopologyBuilder, the nodeAngle list gives the lines in order from the positive x axis.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings