Bug report #16707

SLD export of "hairline" lines results in a different visual thickness

Added by Andrea Aime almost 7 years ago. Updated over 6 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Symbology
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:24606

Description

Exporting a layer using a "hairline" line width results in a LineSymbolizer with no stroke-width property.
That in turns kicks the SLD default of 1 pixel thickness, which is visually thicker than the one used by QGIS.
By trial and error it seems the proper value would be 0.5 pixels instead.

History

#1 Updated by Guilherme Leao almost 7 years ago

Andrea Aime wrote:

Exporting a layer using a "hairline" line width results in a LineSymbolizer with no stroke-width property.
That in turns kicks the SLD default of 1 pixel thickness, which is visually thicker than the one used by QGIS.
By trial and error it seems the proper value would be 0.5 pixels instead.

I have the same problem, in my case it is also changing the line color to Black.

#2 Updated by Eric Xanderson over 6 years ago

This problem seems to affect PDF production also. Hairline (according to Inkscape pdf conversion) creates this style:

```
fill:none;stroke:#808080;stroke-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none
```

When these PDFs are printed, the lines are very ugly, if not absent. When I set the width manually on the style, the issue goes away on outlines.

However, Fill Styles (BDiagonal was tested) doesn't appear modifiable, and presents a problem, making it useless for printable things.

#3 Updated by Andrea Aime over 6 years ago

  • Resolution set to fixed/implemented
  • Affected QGIS version changed from 2.18.9 to master
  • Status changed from Open to Closed

Fixed in QGIS 3.0 for the original ticket report (SLD).
As for PDF, I would suggest to open a separate ticket.

Also available in: Atom PDF