Skip to main content
added 145 characters in body
Source Link
Dennis Bauszus
  • 2.3k
  • 3
  • 21
  • 32

I would like to use Geoserver SLD to style points using one attribute for the size in mapunits and the second attribute for the colour.

This works well as separate rules styling either the colour or the size of the symbol.

This is for Geoserver 2.8

I don't get any result by combining the rules like so:

        <ogc:And>
          <ogc:And>
            <ogc:And>
              <ogc:PropertyIsGreaterThanOrEqualTo>
                <ogc:PropertyName>tt_grid</ogc:PropertyName>
                <ogc:Literal>818</ogc:Literal>
              </ogc:PropertyIsGreaterThanOrEqualTo>
              <ogc:PropertyIsLessThanOrEqualTo>
                <ogc:PropertyName>tt_grid</ogc:PropertyName>
                <ogc:Literal>159174</ogc:Literal>
              </ogc:PropertyIsLessThanOrEqualTo>
            </ogc:And>
            <ogc:PropertyIsGreaterThanOrEqualTo>
              <ogc:PropertyName>y15plus_t_2014</ogc:PropertyName>
              <ogc:Literal>2.2</ogc:Literal>
            </ogc:PropertyIsGreaterThanOrEqualTo>
          </ogc:And>
          <ogc:PropertyIsLessThanOrEqualTo>
            <ogc:PropertyName>y15plus_t_2014</ogc:PropertyName>
            <ogc:Literal>7.2238</ogc:Literal>
          </ogc:PropertyIsLessThanOrEqualTo>
        </ogc:And>

Here is a screenshot directly off Ian's solution.

enter image description here

I would like to use Geoserver SLD to style points using one attribute for the size in mapunits and the second attribute for the colour.

This works well as separate rules styling either the colour or the size of the symbol.

This is for Geoserver 2.8

I don't get any result by combining the rules like so:

        <ogc:And>
          <ogc:And>
            <ogc:And>
              <ogc:PropertyIsGreaterThanOrEqualTo>
                <ogc:PropertyName>tt_grid</ogc:PropertyName>
                <ogc:Literal>818</ogc:Literal>
              </ogc:PropertyIsGreaterThanOrEqualTo>
              <ogc:PropertyIsLessThanOrEqualTo>
                <ogc:PropertyName>tt_grid</ogc:PropertyName>
                <ogc:Literal>159174</ogc:Literal>
              </ogc:PropertyIsLessThanOrEqualTo>
            </ogc:And>
            <ogc:PropertyIsGreaterThanOrEqualTo>
              <ogc:PropertyName>y15plus_t_2014</ogc:PropertyName>
              <ogc:Literal>2.2</ogc:Literal>
            </ogc:PropertyIsGreaterThanOrEqualTo>
          </ogc:And>
          <ogc:PropertyIsLessThanOrEqualTo>
            <ogc:PropertyName>y15plus_t_2014</ogc:PropertyName>
            <ogc:Literal>7.2238</ogc:Literal>
          </ogc:PropertyIsLessThanOrEqualTo>
        </ogc:And>

I would like to use Geoserver SLD to style points using one attribute for the size in mapunits and the second attribute for the colour.

This works well as separate rules styling either the colour or the size of the symbol.

This is for Geoserver 2.8

I don't get any result by combining the rules like so:

        <ogc:And>
          <ogc:And>
            <ogc:And>
              <ogc:PropertyIsGreaterThanOrEqualTo>
                <ogc:PropertyName>tt_grid</ogc:PropertyName>
                <ogc:Literal>818</ogc:Literal>
              </ogc:PropertyIsGreaterThanOrEqualTo>
              <ogc:PropertyIsLessThanOrEqualTo>
                <ogc:PropertyName>tt_grid</ogc:PropertyName>
                <ogc:Literal>159174</ogc:Literal>
              </ogc:PropertyIsLessThanOrEqualTo>
            </ogc:And>
            <ogc:PropertyIsGreaterThanOrEqualTo>
              <ogc:PropertyName>y15plus_t_2014</ogc:PropertyName>
              <ogc:Literal>2.2</ogc:Literal>
            </ogc:PropertyIsGreaterThanOrEqualTo>
          </ogc:And>
          <ogc:PropertyIsLessThanOrEqualTo>
            <ogc:PropertyName>y15plus_t_2014</ogc:PropertyName>
            <ogc:Literal>7.2238</ogc:Literal>
          </ogc:PropertyIsLessThanOrEqualTo>
        </ogc:And>

Here is a screenshot directly off Ian's solution.

enter image description here

added 29 characters in body
Source Link
Dennis Bauszus
  • 2.3k
  • 3
  • 21
  • 32

I would like to use Geoserver SLD to style points using one attribute for the size in mapunits and the second attribute for the colour.

This works well as separate rules styling either the colour or the size of the symbol.

This is for Geoserver 2.8

I don't get any result by combining the rules like so:

        <ogc:And>
          <ogc:And>
            <ogc:And>
              <ogc:PropertyIsGreaterThanOrEqualTo>
                <ogc:PropertyName>tt_grid</ogc:PropertyName>
                <ogc:Literal>818</ogc:Literal>
              </ogc:PropertyIsGreaterThanOrEqualTo>
              <ogc:PropertyIsLessThanOrEqualTo>
                <ogc:PropertyName>tt_grid</ogc:PropertyName>
                <ogc:Literal>159174</ogc:Literal>
              </ogc:PropertyIsLessThanOrEqualTo>
            </ogc:And>
            <ogc:PropertyIsGreaterThanOrEqualTo>
              <ogc:PropertyName>y15plus_t_2014</ogc:PropertyName>
              <ogc:Literal>2.2</ogc:Literal>
            </ogc:PropertyIsGreaterThanOrEqualTo>
          </ogc:And>
          <ogc:PropertyIsLessThanOrEqualTo>
            <ogc:PropertyName>y15plus_t_2014</ogc:PropertyName>
            <ogc:Literal>7.2238</ogc:Literal>
          </ogc:PropertyIsLessThanOrEqualTo>
        </ogc:And>

I would like to use Geoserver SLD to style points using one attribute for the size in mapunits and the second attribute for the colour.

This works well as separate rules styling either the colour or the size of the symbol.

I don't get any result by combining the rules like so:

        <ogc:And>
          <ogc:And>
            <ogc:And>
              <ogc:PropertyIsGreaterThanOrEqualTo>
                <ogc:PropertyName>tt_grid</ogc:PropertyName>
                <ogc:Literal>818</ogc:Literal>
              </ogc:PropertyIsGreaterThanOrEqualTo>
              <ogc:PropertyIsLessThanOrEqualTo>
                <ogc:PropertyName>tt_grid</ogc:PropertyName>
                <ogc:Literal>159174</ogc:Literal>
              </ogc:PropertyIsLessThanOrEqualTo>
            </ogc:And>
            <ogc:PropertyIsGreaterThanOrEqualTo>
              <ogc:PropertyName>y15plus_t_2014</ogc:PropertyName>
              <ogc:Literal>2.2</ogc:Literal>
            </ogc:PropertyIsGreaterThanOrEqualTo>
          </ogc:And>
          <ogc:PropertyIsLessThanOrEqualTo>
            <ogc:PropertyName>y15plus_t_2014</ogc:PropertyName>
            <ogc:Literal>7.2238</ogc:Literal>
          </ogc:PropertyIsLessThanOrEqualTo>
        </ogc:And>

I would like to use Geoserver SLD to style points using one attribute for the size in mapunits and the second attribute for the colour.

This works well as separate rules styling either the colour or the size of the symbol.

This is for Geoserver 2.8

I don't get any result by combining the rules like so:

        <ogc:And>
          <ogc:And>
            <ogc:And>
              <ogc:PropertyIsGreaterThanOrEqualTo>
                <ogc:PropertyName>tt_grid</ogc:PropertyName>
                <ogc:Literal>818</ogc:Literal>
              </ogc:PropertyIsGreaterThanOrEqualTo>
              <ogc:PropertyIsLessThanOrEqualTo>
                <ogc:PropertyName>tt_grid</ogc:PropertyName>
                <ogc:Literal>159174</ogc:Literal>
              </ogc:PropertyIsLessThanOrEqualTo>
            </ogc:And>
            <ogc:PropertyIsGreaterThanOrEqualTo>
              <ogc:PropertyName>y15plus_t_2014</ogc:PropertyName>
              <ogc:Literal>2.2</ogc:Literal>
            </ogc:PropertyIsGreaterThanOrEqualTo>
          </ogc:And>
          <ogc:PropertyIsLessThanOrEqualTo>
            <ogc:PropertyName>y15plus_t_2014</ogc:PropertyName>
            <ogc:Literal>7.2238</ogc:Literal>
          </ogc:PropertyIsLessThanOrEqualTo>
        </ogc:And>
Source Link
Dennis Bauszus
  • 2.3k
  • 3
  • 21
  • 32

Geoserver SLD bivariate styling

I would like to use Geoserver SLD to style points using one attribute for the size in mapunits and the second attribute for the colour.

This works well as separate rules styling either the colour or the size of the symbol.

I don't get any result by combining the rules like so:

        <ogc:And>
          <ogc:And>
            <ogc:And>
              <ogc:PropertyIsGreaterThanOrEqualTo>
                <ogc:PropertyName>tt_grid</ogc:PropertyName>
                <ogc:Literal>818</ogc:Literal>
              </ogc:PropertyIsGreaterThanOrEqualTo>
              <ogc:PropertyIsLessThanOrEqualTo>
                <ogc:PropertyName>tt_grid</ogc:PropertyName>
                <ogc:Literal>159174</ogc:Literal>
              </ogc:PropertyIsLessThanOrEqualTo>
            </ogc:And>
            <ogc:PropertyIsGreaterThanOrEqualTo>
              <ogc:PropertyName>y15plus_t_2014</ogc:PropertyName>
              <ogc:Literal>2.2</ogc:Literal>
            </ogc:PropertyIsGreaterThanOrEqualTo>
          </ogc:And>
          <ogc:PropertyIsLessThanOrEqualTo>
            <ogc:PropertyName>y15plus_t_2014</ogc:PropertyName>
            <ogc:Literal>7.2238</ogc:Literal>
          </ogc:PropertyIsLessThanOrEqualTo>
        </ogc:And>