Skip to main content
Solved

Joining two lines based on angle

  • July 23, 2019
  • 3 replies
  • 69 views

deanhowell
Influencer
Forum|alt.badge.img+24

Hello all,

I am trying to join lines that have the same bearing (angle) but I am finding that the orientation of some are reversed.

I have created two attributes bearing and back-bearing and have been successful joining based on one or the other when they are oriented the same way, but am stumped how to join when the orientation is different. In the example below the two pink lines are the same (but reversed) angle)

The above shows the bearing in the first is equal to the backbearing in the second

 

 

Any assistance would be very much appreciated.

Regards

Dean

Best answer by jdh

You can normalize the values to 180. If bearing > 180, set the bearing to 360-bearing. (assuming they are already normalized to 0-360).

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.

3 replies

stalknecht
Contributor
Forum|alt.badge.img+21
  • Contributor
  • 305 replies
  • July 23, 2019

Maybe this can help,

Use an AttributeManager:

Conditional value: If BackBearing > Bearing set Bearing the value of Backbearing and BackBearing the value of Bearing.

This way you always have the same Bearing for each orientation!

 


jdh
Contributor
Forum|alt.badge.img+37
  • Contributor
  • 2002 replies
  • Best Answer
  • July 23, 2019

You can normalize the values to 180. If bearing > 180, set the bearing to 360-bearing. (assuming they are already normalized to 0-360).


deanhowell
Influencer
Forum|alt.badge.img+24
  • Author
  • Influencer
  • 315 replies
  • July 23, 2019

Maybe this can help,

Use an AttributeManager:

Conditional value: If BackBearing > Bearing set Bearing the value of Backbearing and BackBearing the value of Bearing.

This way you always have the same Bearing for each orientation!

 

Thanks @stalknecht and @jdh both worked as expected. Sometimes a fresh set of eyes is all it takes :)