Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve dynamic symbolizers from GeoServer #961

Open
KaiVolland opened this issue Aug 30, 2024 · 2 comments
Open

Resolve dynamic symbolizers from GeoServer #961

KaiVolland opened this issue Aug 30, 2024 · 2 comments
Assignees

Comments

@KaiVolland
Copy link
Contributor

The GeoServer allows a certain syntax to provide Symbolizers with dyanmic graphics derived from an attribute:
https://docs.geoserver.org/latest/en/user/styling/sld/extensions/pointsymbols.html#dynamic-symbolizers

The current code of the get method does not seem to work:
https://github.com/geostyler/geostyler-sld-parser/blob/main/src/Util/SldUtil.ts#L185

We have to check this code again.

Example style:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<StyledLayerDescriptor version="1.0.0" xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd" xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:se="http://www.opengis.net/se">
  <NamedLayer>
    <Name>GeoStyler Demo</Name>
    <UserStyle>
      <Name>GeoStyler Demo</Name>
      <Title>GeoStyler Demo</Title>
      <FeatureTypeStyle>
        <Rule>
          <Name>Rule 1</Name>
          <PointSymbolizer>
            <Graphic>
              <ExternalGraphic>
                <OnlineResource xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="styleservlet/getIcon?name=${code}_selected.png"/>
              </ExternalGraphic>
              <Size>90</Size>
            </Graphic>
          </PointSymbolizer>
        </Rule>
      </FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>

Describe the solution you'd like
I think it would make sense to use the same template syntax like we have in the TextSymbolizer.label.

Describe alternatives you've considered
As an alternative we could make use of the GeoStylerFunctions here and add somelike "asTemplateString" to the metadata.

Additional context
Add any other context or screenshots about the feature request here.

@jansule
Copy link
Contributor

jansule commented Sep 2, 2024

To me it looks like this is a geoserver specific solution and not part of the official SLD spec. So I think it should rather be part of the geostyler-geoserver-parser instead of the geostyler-sld-parser.

@KaiVolland
Copy link
Contributor Author

I don't think there is a geostyler-geoserver-parser that is still maintained. We could think about supporting some GeoServer extras if it doesn't break the SLD parsing itself. I'm afraid maintaining another parser will be harder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants