I don't think there is a tool that does that out of the box (edit: nevermind, see above). But you can easily calculate the value with Calculate Field.
angle of the lines in the image respect to the North
Do you mean the geographic angle (North=0°, East=90°)? If so, use this Arcade expression in the tool:
// get a list of line parts
var paths = Geometry($feature).paths
// for each part, loop through each segment and get its angle (arithmetic angle -> East=0°, North=90°)
var angles = []
for(var p in paths) {
var count_p = Count(paths[p])
for(var q = 1; q < count_p; q ++) {
var a = Angle(paths[p][q], paths[p][q-1])
Push(angles, a)
}
}
// get the mean arithmetic angle
var arith_angle = Mean(angles)
// convert to geographic and return
return (450 - arith_angle) % 360
Or do you mean the arithmetic angle (rotating counter-clockwise) but with North = 0°? Then use this expression:
// get a list of line parts
var paths = Geometry($feature).paths
// for each part, loop through each segment and get its angle (arithmetic angle -> East=0°, North=90°)
var angles = []
for(var p in paths) {
var count_p = Count(paths[p])
for(var q = 1; q < count_p; q ++) {
var a = Angle(paths[p][q], paths[p][q-1])
Push(angles, a)
}
}
// get the mean arithmetic angle
var arith_angle = Mean(angles)
// rotate so that North = 0°
var north_arith_angle = arith_angle - 90
return north_arith_angle + IIF(north_arith_angle < 0, 180, 0)
Or do you mean something else? Then please clarify.
Have a great day!
Johannes