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

GeoStyler not applying SLD colour #204

Open
geographika opened this issue Mar 16, 2020 · 4 comments
Open

GeoStyler not applying SLD colour #204

geographika opened this issue Mar 16, 2020 · 4 comments
Labels
bug Something isn't working low priority Low priority development item wontfix This will not be worked on

Comments

@geographika
Copy link
Collaborator

geographika commented Mar 16, 2020

One of the new demo layers uses a cross symbol based on the SLD generated by https://w08-mapserver.compass.ie/mapserver/?map=/MapServer/apps/mapview-demo/example.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetStyles&LAYERS=ruins

<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd">
   <NamedLayer>
      <Name>ruins</Name>
      <UserStyle>
         <FeatureTypeStyle>
            <Rule>
               <Name>POI: Ruins</Name>
               <PointSymbolizer>
                  <Graphic>
                     <Mark>
                        <WellKnownName>cross</WellKnownName>
                        <Fill>
                           <CssParameter name="fill">#ffd966</CssParameter>
                        </Fill>
                     </Mark>
                     <Size>8</Size>
                  </Graphic>
               </PointSymbolizer>
            </Rule>
         </FeatureTypeStyle>
      </UserStyle>
   </NamedLayer>
</StyledLayerDescriptor>

The legend displays the correct colour (yellow), but the features themselves are displayed in black.
See screencast at https://drive.google.com/file/d/1azO1N_ur1wQDRmDRsfEok_TFqw91YgWD/view

Updating #ffd966 to yellow does not change the result.

@geographika geographika added the bug Something isn't working label Jul 16, 2020
@chrismayer
Copy link
Collaborator

Problem ist at the OpenLayer Parser. When I use the SLD preview everything is correct:

SLD renderer

image

vs.

OpenLayers renderer

image

I'd suggest to make a version upgrade of geostyler-openlayers-parser first and check if this solves the problem. Otherwise this has to be fixed there.

@geographika
Copy link
Collaborator Author

Thanks for looking at this. Currently geostyler-openlayers-parser has to remain on 0.21.0 as v1.0.0 requires OpenLayers 5.0 or higher.
Will review again if we move to OL6 in the future.

@geographika geographika added low priority Low priority development item wontfix This will not be worked on labels Oct 22, 2020
@geographika
Copy link
Collaborator Author

Same behaviour in the latest version
It appears for a cross a default stroke is applied if none is set.

I'm unsure if cross should support just fill (the SLD in the first example was generated by MapServer).

Setting a <stroke> in the XML allows the colour to be set correctly:

<?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">
  <NamedLayer>
    <Name>ruins</Name>
    <UserStyle>
      <Name>ruins</Name>
      <Title>ruins</Title>
      <FeatureTypeStyle>
        <Rule>
          <Name>POI: Ruins</Name>
          <PointSymbolizer>
            <Graphic>
              <Mark>
                <WellKnownName>cross</WellKnownName>
                <Stroke>
                  <CssParameter name="stroke">#ffd966</CssParameter>
                  <CssParameter name="stroke-width">3</CssParameter>
                </Stroke>
              </Mark>
              <Size>8</Size>
            </Graphic>
          </PointSymbolizer>
        </Rule>
      </FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>

@chrismayer
Copy link
Collaborator

I'm unsure if cross should support just fill (the SLD in the first example was generated by MapServer).

Also unsure what the standard says. We might have to check if this is standard compliant. If yes we could adapt the geostyler parser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working low priority Low priority development item wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants