Bug report #8567

SLD : an invalid sld is generated when exporting a polygon with fill styles

Added by Yewondwossen Assefa about 11 years ago. Updated about 11 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:Yes Resolution:fixed
Crashes QGIS or corrupts data:No Copied to github as #:17313

Description

This was initially reported on the mailing list:
- http://lists.osgeo.org/pipermail/qgis-user/2013-August/023650.html
- http://lists.osgeo.org/pipermail/qgis-developer/2013-August/028011.html

The sld produced is invalid at the GraphicFill level:

<se:GraphicFill>
<se:Graphic/>
<se:Mark>
<se:WellKnownName>x</se:WellKnownName>
<se:Stroke>
<se:SvgParameter name="stroke">#0000ff</se:SvgParameter>
</se:Stroke>
</se:Mark>
</se:GraphicFill>

The Mark element sould be a child of the <se:Graphic> element and not <se:GraphicFill>:
<se:GraphicFill>
<se:Graphic>
<se:Mark>
<se:WellKnownName>x</se:WellKnownName>
<se:Stroke>
<se:SvgParameter name="stroke">#0000ff</se:SvgParameter>
</se:Stroke>
</se:Mark>
</se:Graphic>
</se:GraphicFill>

The error comes from file ./src/core/symbology-ng/qgssymbollayerv2utils.cpp QgsSymbolLayerV2Utils::fillToSld (around line 1523).
Attached is the diff to correct it. This has been tested locally and gives the expected result.

qgis_sld_error.diff Magnifier - git diff for the fix (774 Bytes) Yewondwossen Assefa, 2013-09-03 09:17 AM

Associated revisions

History

#1 Updated by Giovanni Manghi about 11 years ago

  • Operating System deleted (all)
  • Status changed from Open to Feedback
  • Category set to Symbology

Hi, thanks for the patch. Would you mind make a pull request on github? here patches are likely to be overlooked.

#2 Updated by Giuseppe Sucameli about 11 years ago

  • Status changed from Feedback to Closed

#3 Updated by Giuseppe Sucameli about 11 years ago

  • Resolution set to fixed

The patch is applied, thanks!
Please, the next time create a pull request on GitHub.

Also available in: Atom PDF