Uploaded image for project: 'GeoServer'
  1. GEOS-8317

GetFeatureInfo returns no features if point layer has style that uses sld:ElseFilter

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 2.11.1, 2.11.2, 2.12-RC1
    • Fix Version/s: 2.11.4, 2.12.1
    • Component/s: None
    • Labels:
      None
    • Environment:

      Windows 7, Windows 10
      GeoServer 2.12-RC1

      Description

      The WMS GetFeatureInfo returns an empty collection when querying a point layer that has a style the uses the sld:ElseFilter.

      In GeoServer 2.9.0 it works as expected but in 2.11.1, 2.11.2 and 2.12-RC1 it does not.

      I have reproduced this using the Manhattan (NY) points of interest demo layer in layer preview with the following style:

      <?xml version="1.0" encoding="UTF-8"?>
      <StyledLayerDescriptor version="1.0.0" xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:sld="http://www.opengis.net/sld"
        xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd">
        <NamedLayer>
          <Name>poi</Name>
          <UserStyle>
            <Name>poi</Name>
            <Title>Points of interest</Title>
            <Abstract>Manhattan points of interest</Abstract>
            <FeatureTypeStyle>
              <Rule>
                <ogc:Filter>
                  <ogc:PropertyIsEqualTo>
                    <ogc:PropertyName>NAME</ogc:PropertyName>
                    <ogc:Literal>art</ogc:Literal>
                  </ogc:PropertyIsEqualTo>
                </ogc:Filter>
                <PointSymbolizer>
                  <Graphic>
                    <Mark>
                      <WellKnownName>circle</WellKnownName>
                      <Fill>
                        <CssParameter name="fill">#FF0000</CssParameter>
                        <CssParameter name="fill-opacity">1.0</CssParameter>
                      </Fill>
                    </Mark>
                    <Size>11</Size>
                  </Graphic>
                </PointSymbolizer>
                <PointSymbolizer>
                  <Graphic>
                    <Mark>
                      <WellKnownName>circle</WellKnownName>
                      <Fill>
                        <CssParameter name="fill">#EDE513</CssParameter>
                        <CssParameter name="fill-opacity">1.0</CssParameter>
                      </Fill>
                    </Mark>
                    <Size>7</Size>
                  </Graphic>
                </PointSymbolizer>
              </Rule>
              <Rule>
                <sld:ElseFilter/>
                <PointSymbolizer>
                  <Graphic>
                    <Mark>
                      <WellKnownName>square</WellKnownName>
                      <Fill>
                        <CssParameter name="fill">#FF0000</CssParameter>
                        <CssParameter name="fill-opacity">1.0</CssParameter>
                      </Fill>
                    </Mark>
                    <Size>11</Size>
                  </Graphic>
                </PointSymbolizer>
                <PointSymbolizer>
                  <Graphic>
                    <Mark>
                      <WellKnownName>square</WellKnownName>
                      <Fill>
                        <CssParameter name="fill">#EDE513</CssParameter>
                        <CssParameter name="fill-opacity">1.0</CssParameter>
                      </Fill>
                    </Mark>
                    <Size>7</Size>
                  </Graphic>
                </PointSymbolizer>
              </Rule>
            </FeatureTypeStyle>
          </UserStyle>
        </NamedLayer>
      </StyledLayerDescriptor>
      

      Steps to reproduce:
      1. Using GeoServer 2.12-RC1 and the demo data
      2. Edit the poi style, replace with above style
      3. Open Manhattan (NY) points of interest as OpenLayers map in Layer preview
      4. Click on the circle (art), feature information is displayed
      5. Click on any square, no feature information is displayed

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                aaime Andrea Aime
                Reporter:
                kevanfarrah Kevan Farrah
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: