Hi all,

I am stuck here, some help would be very appreciated.
I am trying to create a layer style ( sld ) based in area of each geometry
feature in a shapefile.
It is possible? If it is not, can i use the feature id to create a style?

For while i got the below code, that try to interpolate the area values as
color gradients, but it isnt working. ( Looks like the area value is not
being evaluated ).

<?xml version="1.0" encoding="UTF-8"?><sld:StyledLayerDescriptor 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";
version="1.0.0">
  <sld:NamedLayer>
    <sld:Name>COLOR_MAP NAME</sld:Name>
    <sld:UserStyle>
      <sld:Name>COLOR_MAP NAME</sld:Name>
      <sld:Title>COLOR_MAP</sld:Title>
      <sld:FeatureTypeStyle>
        <sld:Name>name</sld:Name>
        <sld:Rule>
          <sld:PolygonSymbolizer>
            <sld:Fill>
              <sld:CssParameter name="fill">
                <ogc:Function name="Interpolate">
                  <ogc:Function name="area">
                    <ogc:PropertyName>CNTRY_NAME</ogc:PropertyName>
                  </ogc:Function>
                  <ogc:Literal>1</ogc:Literal>
                  <ogc:Literal>#0000FF</ogc:Literal>
                  <ogc:Literal>2</ogc:Literal>
                  <ogc:Literal>#005FFF</ogc:Literal>
                  <ogc:Literal>3</ogc:Literal>
                  <ogc:Literal>#00BFFF</ogc:Literal>
                  <ogc:Literal>4</ogc:Literal>
                  <ogc:Literal>#20FFDF</ogc:Literal>
                  <ogc:Literal>5</ogc:Literal>
                  <ogc:Literal>#80FF7F</ogc:Literal>
                  <ogc:Literal>6</ogc:Literal>
                  <ogc:Literal>#E0FF1F</ogc:Literal>
                  <ogc:Literal>7</ogc:Literal>
                  <ogc:Literal>#FFBE00</ogc:Literal>
                  <ogc:Literal>8</ogc:Literal>
                  <ogc:Literal>#FF0100</ogc:Literal>
                  <ogc:Literal>color</ogc:Literal>
                </ogc:Function>
              </sld:CssParameter>
            </sld:Fill>
            <sld:Stroke>
              <sld:CssParameter name="stroke">#FFFFFF</sld:CssParameter>
            </sld:Stroke>
          </sld:PolygonSymbolizer>
        </sld:Rule>
      </sld:FeatureTypeStyle>
    </sld:UserStyle>
  </sld:NamedLayer>
</sld:StyledLayerDescriptor>


Thanks!
------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to