Within the tan layer I am using a combination of colour, point, and line symbols to represent a specific lithologies in a geologic map. I would like to rotate the line symbols which I have in the tan-coloured layer so that they line up with the orientation of the nearest margin. The geologic layer that I am showing is folded, and I would like the orientation of the line symbols to follow the trend of the rock fabric within the fold.
Alternatively, I could add an additional simplified line, which I have drawn in blue, and reference the orientation of the symbols to that line. This would likely make the fill rendering simpler, and accomplish nearly the same thing.
This is what I have so far, but I am unable to get it to work.
degrees(
azimuth(
start_point(
closest_point(
$geometry,
aggregate(
'polygon_layer',
'collect',
$geometry
)
)
),
end_point(
closest_point(
$geometry,
aggregate(
'polygon_layer',
'collect',
$geometry
)
)
)
)
)