Bug report #6413
Support SLD with multiple FeatureTypeStyles
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: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 15665 |
Description
I have the following SLD description:
<StyledLayerDescriptor version="1.0.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ogc="http://www.opengis.net/ogc" xmlns="http://www.opengis.net/sld"> <NamedLayer> <Name>test</Name> <UserStyle> <Name>test</Name> <FeatureTypeStyle> <Rule> <LineSymbolizer> <Stroke> <CssParameter name="stroke-width">4</CssParameter> <CssParameter name="stroke">#dddddd</CssParameter> </Stroke> </LineSymbolizer> </Rule> </FeatureTypeStyle> <FeatureTypeStyle> <Rule> <PolygonSymbolizer> <Fill> <CssParameter name="fill">#fa5000</CssParameter> </Fill> </PolygonSymbolizer> </Rule> </FeatureTypeStyle> </UserStyle> </NamedLayer> </StyledLayerDescriptor>
When I try to render layer using this SLD by GeoServer I get expected result. In QGIS result is strange, it looks like QGIS doesn't support multiple FeatureTypeStyles sections within one SLD.
Associated revisions
Add support for reading SLD's with multiple FeatureTypeStyle elements.
Introduce a virtual FeatureTypeStyle to add support for reading SLD documents with more than one FeatureTypeStyle element.
Still supports SLD's with one FeatureTypeStyle, as well as SLD's with multiple FeatureTypeStyles, including empty FeatureTypeStyles (not breaking single symbol rendering in that case). Complies with SLD's painter's model for rendering, appending Rules from subsequent FeatureTypeStyles in order.
History
#1 Updated by Giuseppe Sucameli about 12 years ago
- Priority changed from High to Normal
SLD docs containing multiple FeatureTypeStyle are not supported yet.
#2 Updated by Paolo Cavallini almost 12 years ago
- Assignee changed from Giuseppe Sucameli to anonymous -
#3 Updated by Jürgen Fischer about 11 years ago
- Assignee deleted (
anonymous -)
#4 Updated by Jürgen Fischer over 10 years ago
- Target version changed from Version 2.0.0 to Future Release - Lower Priority
#5 Updated by Roel Huybrechts over 9 years ago
I added support for this in Github pull request 1894: https://github.com/qgis/QGIS/pull/1894
I'm open to comments and improvements here as well as on the Github page.
#6 Updated by Luigi Pirelli over 7 years ago
confirmed that PR fix the error. The imported sld is converted in rule based with a rule for each FeatureStyle.
tested on 2.18 e35939
#7 Updated by Luigi Pirelli over 7 years ago
approved the PR, can be merged to fix.
Would be necessary to port the PR to QGIS3
#8 Updated by Giovanni Manghi over 7 years ago
- Regression? set to No
- Easy fix? set to No
#9 Updated by Andrea Aime almost 7 years ago
- Description updated (diff)
Hi Luigi, any reason why this ticket is still open?
#10 Updated by Giovanni Manghi almost 7 years ago
- Status changed from Open to Feedback
#11 Updated by Giovanni Manghi over 6 years ago
- Status changed from Feedback to Open
- Pull Request or Patch supplied changed from No to Yes
Andrea Aime wrote:
Hi Luigi, any reason why this ticket is still open?
it seems the PR misses a unit test.
#12 Updated by Roel Huybrechts over 6 years ago
- % Done changed from 0 to 100
- Status changed from Open to Closed
Applied in changeset qgis|c49a18c587b660779276ebeff1d1a4f2011645df.