3

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

enter image description here

2
  • Start- end-point are in fact the same point, as you use for both the closest-point. How do you create the small lines you want to rotate?
    – Babel
    Commented May 20, 2023 at 21:34
  • I see what you mean. Is it possible to produce an expression that refers to the center point of the closest linear feature? I think taking the approach of using the blue line instead of the polygon boundaries would produce a nicer result. The small lines are Point Pattern Fill > Marker > Font Marker > "-".
    – Evan
    Commented May 22, 2023 at 21:38

1 Answer 1

3

Instead of point pattern fill, create a point grid covering the polygon since the point pattern fill are just one single geometry per polygon, even though visually, there are many. So you can't set an individual rotation.

This here is a solution for the orientation/rotation according to the closest point of the polygon boundary - for the solution to use the blue line instead of the polygon boundaries, see here:

line_interpolate_angle(
    boundary(overlay_within('polygon_layer',$geometry)[0]),
    line_locate_point(
        boundary(overlay_within('polygon_layer',$geometry)[0]),
        $geometry
    )
)

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.