The SLD your are using requires SE 1.1.

The common 1.0 approach is to write a rules for each value.

In any case I dubt that you have CNTRY_NAMEs called 1,2,3,4 ... maybe would
be better to change numbers with the country names.

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for
more information.
==

Ing. Alessio Fabiani
@alfa7691
Founder/Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272
mob:   +39  331 6233686

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------


On Thu, Dec 5, 2013 at 10:44 PM, Danilo da Silveira Figueira <
danilomal...@hotmail.com> wrote:

> 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
>
>
------------------------------------------------------------------------------
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