[Geoserver-devel] [jira] (GEOS-5915) Possible error translating CSS ranged rules

Andrea Aime created BugGEOS-5915
Possible error translating CSS ranged rules

Issue Type:

BugBug

Assignee:

David Winslow

Components:

CSS

Created:

23/Jul/13 5:32 AM

Description:

The following CSS:

* {
  mark: symbol(circle);
  mark-size: 8;
}

:mark {
  fill: #0033CC;
}

[pop >= 50000] [pop < 100000] {
  mark-size: 12;
}

[pop >= 100000] {
  mark-size: 16;
}

translates into:

<?xml version="1.0" encoding="UTF-8"?>
<sld:UserStyle xmlns="http://www.opengis.net/sld" xmlns:sld="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml">
  <sld:Name>Default Styler</sld:Name>
  <sld:FeatureTypeStyle>
    <sld:Name>name</sld:Name>
    <sld:Rule>
      <ogc:Filter>
        <ogc:And>
          <ogc:PropertyIsGreaterThanOrEqualTo>
            <ogc:PropertyName>pop</ogc:PropertyName>
            <ogc:Literal>50000</ogc:Literal>
          </ogc:PropertyIsGreaterThanOrEqualTo>
          <ogc:Not>
            <ogc:PropertyIsGreaterThanOrEqualTo>
              <ogc:PropertyName>pop</ogc:PropertyName>
              <ogc:Literal>100000</ogc:Literal>
            </ogc:PropertyIsGreaterThanOrEqualTo>
          </ogc:Not>
        </ogc:And>
      </ogc:Filter>
      <sld:PointSymbolizer>
        <sld:Graphic>
          <sld:Mark>
            <sld:WellKnownName>circle</sld:WellKnownName>
            <sld:Fill>
              <sld:CssParameter name="fill">#0033CC</sld:CssParameter>
            </sld:Fill>
          </sld:Mark>
          <sld:Size>12</sld:Size>
        </sld:Graphic>
      </sld:PointSymbolizer>
    </sld:Rule>
    <sld:Rule>
      <ogc:Filter>
        <ogc:PropertyIsGreaterThanOrEqualTo>
          <ogc:PropertyName>pop</ogc:PropertyName>
          <ogc:Literal>100000</ogc:Literal>
        </ogc:PropertyIsGreaterThanOrEqualTo>
      </ogc:Filter>
      <sld:PointSymbolizer>
        <sld:Graphic>
          <sld:Mark>
            <sld:WellKnownName>circle</sld:WellKnownName>
            <sld:Fill>
              <sld:CssParameter name="fill">#0033CC</sld:CssParameter>
            </sld:Fill>
          </sld:Mark>
          <sld:Size>16</sld:Size>
        </sld:Graphic>
      </sld:PointSymbolizer>
    </sld:Rule>
    <sld:Rule>
      <ogc:Filter>
        <ogc:Not>
          <ogc:PropertyIsGreaterThanOrEqualTo>
            <ogc:PropertyName>pop</ogc:PropertyName>
            <ogc:Literal>50000</ogc:Literal>
          </ogc:PropertyIsGreaterThanOrEqualTo>
        </ogc:Not>
      </ogc:Filter>
      <sld:PointSymbolizer>
        <sld:Graphic>
          <sld:Mark>
            <sld:WellKnownName>circle</sld:WellKnownName>
            <sld:Fill>
              <sld:CssParameter name="fill">#0033CC</sld:CssParameter>
            </sld:Fill>
          </sld:Mark>
          <sld:Size>8</sld:Size>
        </sld:Graphic>
      </sld:PointSymbolizer>
    </sld:Rule>
  </sld:FeatureTypeStyle>
</sld:UserStyle>

Shouldn’t the last rule use PropertyIsLessThan instead?

Project:

GeoServer

Priority:

MajorMajor

Reporter:

Andrea Aime

This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: [http://www.atlassian.com/software/jira](http://www.atlassian.com/software/jira)