highsource / highsource/ogc-schemas

PerpendicularOffset not parsed on LineSymbolizer (Geoserver SLD)

Open
#185 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
84
Forks
49
PR merge metrics
No merged PRs in 30d

Description

So using the GeoServer SLD parser on this XML:

```


Dashed line

SLD Cook Book: Offset line




#000000




#FF0000
5 2

5




```

I'm getting back:

```
{"TYPE_NAME":"SLD_1_0_0.StyledLayerDescriptor","version":"1.0.0","namedLayerOrUserLayer":[{"TYPE_NAME":"SLD_1_0_0.NamedLayer","name":"Dashed line","namedStyleOrUserStyle":[{"TYPE_NAME":"SLD_1_0_0.UserStyle","title":"SLD Cook Book: Offset line","featureTypeStyle":[{"TYPE_NAME":"SLD_1_0_0.FeatureTypeStyle","rule":[{"TYPE_NAME":"SLD_1_0_0.Rule","symbolizer":[{"name":{"namespaceURI":"http://www.opengis.net/sld","localPart":"LineSymbolizer","prefix":"sld","key":"{http://www.opengis.net/sld}LineSymbolizer","string":"{http://www.opengis.net/sld}sld:LineSymbolizer"},"value":{"TYPE_NAME":"SLD_1_0_0.LineSymbolizer","stroke":{"TYPE_NAME":"SLD_1_0_0.Stroke","cssParameter":[{"TYPE_NAME":"SLD_1_0_0.CssParameter","name":"stroke","content":["#000000"]}]}}},{"name":{"namespaceURI":"http://www.opengis.net/sld","localPart":"LineSymbolizer","prefix":"sld","key":"{http://www.opengis.net/sld}LineSymbolizer","string":"{http://www.opengis.net/sld}sld:LineSymbolizer"},"value":{"TYPE_NAME":"SLD_1_0_0.LineSymbolizer","stroke":{"TYPE_NAME":"SLD_1_0_0.Stroke","cssParameter":[{"TYPE_NAME":"SLD_1_0_0.CssParameter","name":"stroke","content":["#FF0000"]},{"TYPE_NAME":"SLD_1_0_0.CssParameter","name":"stroke-dasharray","content":["5 2"]}]}}}]}]}]}]}]}
```

So PerpendicularOffset is not parsed even though it's allowed by the GeoServer schema

https://github.com/geoserver/geoserver/commit/7d00473b6c7ddab81d331aec38dc2c301d1d7359

Or was the parser done before this change was done in the GeoServer schema?

https://github.com/geoserver/geoserver/commit/7d00473b6c7ddab81d331aec38dc2c301d1d7359

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by comparing the GeoServer SLD schema change with the schema definition used for LineSymbolizer and the parser output shown in this issue. Trace how LineSymbolizer child elements are represented, then verify that PerpendicularOffset appears in the parsed result for the supplied XML example.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, xml
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.