I'm struggling with creating a visually clean dashed line style in QGIS for overlapping boundaries of two layers. Here's my setup:
Context: I have two polygon layers: Protected Area (green): Dashed boundary. Habitat Area (purple): Solid boundary.
These layers overlap partially. Where they share boundaries, the dashed line should align nicely with the solid line for a professional look.
Current Issues: When I apply a dashed line style to the "Protected Area" layer (green), the dashes are inconsistent. They often form irregular patterns, especially on curved or complex geometries. I tried the "Custom Dash Pattern" option with specific values for dash length and gap (e.g., 2 mm dash, 1 mm gap), but the results are uneven.(2 screenshots for context)
The dashed pattern scales awkwardly when exporting maps or zooming in/out, making the visualization look unprofessional.
I also enabled "Align dash pattern to line length," but it didn't improve the result.
Attempts: Used Geometry Simplification to smooth out the line geometry. It helped slightly but didn't solve the root issue.(Screenshot, it somehow smoothed out a couple squares with different tolerance attempts but taht's about it) Tested combinations of line styles, widths, and custom dash patterns, but the dashes still appear uneven or misaligned.
Goal: I need a clean and professional dashed line for the green boundary that:
Aligns properly with the shared boundary (solid purple line). Scales well for A0-sized maps at a 1:10,000 scale.
Question: How can I achieve a consistent and elegant dashed line for overlapping boundaries in QGIS? Is there a specific workflow, setting, or workaround I should follow? Maybe my starting point is compelety off?
starting point: I extracted the boundaries of both polygon layers using the "Extract Boundary" tool. I then used the "Intersection" tool to identify and isolate the shared boundaries between the two layers.
Additional Note: I do not want to use boundary offsets (e.g., shifting one line inward or outward) to solve this issue, as I aim to keep the boundaries geographically accurate.
Screenshot1: One of many Custom Dash Pattern Screenshot2: Dash Pattern Option


