I try to set a custom dash pattern for simple line using QGIS 3.4. Both my project and layer are in a projected CRS using meter as unit (EPSG:2154, layer are stored as Multilinestring in a geopackage).

This dash pattern should display a repeating 1.5 meter dash followed by a 5 meter blank space. I set my symbology unit as "Meters at Scale" (I also did try with "Meters" as unit with the exact same result) and use a custom dash pattern with [1.5;5] value.

As you can see in the image below the dash are rendered as 0.9m and the space between the dash mesure around 3.3m (as I'm measuring 3 dash and 2 space the total length should be 14,5m the measuring tool give a total of 9.5m). I try changing Cap style between flat and square, checking/unchecking the "Clip Feature to Canvas Extent" option and using different ellipsoid for measurement (the one associated with my CRS and none/Planimetric) but none of that give me a dash pattern close to 1.5m/5m.

enter image description here

Is this a bug still present in QGIS 3.4 (I find some related bug for the old QGIS version 2) or is there a way to get accurate dash pattern ?

  • Have you tried using map units? How far from the "center" of your CRS area are your lines? – Erik 2 days ago
  • @Erik map units give exactly the same result, I'm a few hundred km from the center of CRS but using an ellipsoid for measuring should compensate... – J.R 2 days ago

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.