Skip to main content
Solved

Joining two lines based on angle


deanhowell
Influencer
Forum|alt.badge.img+23

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).

View original
Did this help you find an answer to your question?

3 replies

stalknecht
Contributor
Forum|alt.badge.img+19
  • Contributor
  • 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+28
  • Contributor
  • 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+23
  • Author
  • Influencer
  • July 23, 2019
stalknecht wrote:

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 :)


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