Pedro, We used the function "in3" as referenced at http://docs.geoserver.org/latest/en/user/filter/function_reference.html This supports in2 through in10. You may be able to match multiple features based on the ogc:or.
Here is an example of how we used it:
<sld:Rule>
<sld:Name>Default Rule 1 to inf</sld:Name>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:Function name="in3">
<ogc:Function name="geometryType">
<ogc:PropertyName>the_geom</ogc:PropertyName>
</ogc:Function>
<ogc:Literal>LineString</ogc:Literal>
<ogc:Literal>LinearRing</ogc:Literal>
<ogc:Literal>MultiLineString</ogc:Literal>
</ogc:Function>
<ogc:Literal>true</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<sld:LineSymbolizer>
<sld:Stroke>
<sld:CssParameter name="stroke-width">.75</sld:CssParameter>
<sld:CssParameter name="stroke">#424242</sld:CssParameter>
</sld:Stroke>
</sld:LineSymbolizer>
</sld:Rule>
Your example
<sld:Rule>
<sld:Name>Match MultipleFeatures</sld:Name>
<ogc:Filter>
<ogc:Or>
<ogc:PropertyIsEqualTo>
<ogc:Function
name="in3">
<PropertyName>ID</PropertyName>
<ogc:Literal>1</ogc:Literal>
<ogc:Literal>2</ogc:Literal>
<ogc:Literal>3</ogc:Literal>
</ogc:Function>
<ogc:Literal>true</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:Function
name="in4">
<PropertyName>ID</PropertyName>
<ogc:Literal>4</ogc:Literal>
<ogc:Literal>7</ogc:Literal>
<ogc:Literal>34</ogc:Literal>
<ogc:Literal>56</ogc:Literal>
</ogc:Function>
<ogc:Literal>true</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:Function
name="in2">
<PropertyName>ID</PropertyName>
<ogc:Literal>98</ogc:Literal>
<ogc:Literal>322</ogc:Literal>
</ogc:Function>
<ogc:Literal>true</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Or>
</ogc:Filter>
</sld:Rule>
Chris Snider
Senior Software Engineer
Intelligent Software Solutions, Inc.
[Description: Description: Description: cid:[email protected]]
From: Pedro Briones Garcia [mailto:[email protected]]
Sent: Tuesday, June 11, 2013 2:20 AM
To: '[email protected]'
Subject: [Geoserver-users] How to group values in SLD
Hello.
First of all, excuse my poor English.
I have the following problem. I need to represent a lot of polygons (hundreds)
in GeoServer with SLD_BODY option. The request is very long, so it is a problem
in the client environment, because the request is cut and it doesn't execute. I
need to make it smaller.
I have hundred of polygons, but all polygons are painted with a color from five
available, so instead of define a rule for each polygon, I would like to group
all the polygons with the same symbol to reduce the length of the request. Is
it possible to use something similar to "IN" operator to group values to
represent?
How can I obtain somethin similar to:
<PropertyIsEqualTo>
<PropertyName>ID</PropertyName>
<Literal>1,2,3,4,7,34,65,98,322,...</Literal>
</PropertyIsEqualTo>
Thanks in advance
Best regards
Un saludo
Pedro Briones García
Jefe de Grupo de Actuaciones y Proyectos
Gerencia de SIG y Consultoría
Grupo Tragsa (Grupo SEPI)
Julián Camarillo, 6B · Planta 2ªB
28037 Madrid
Tel.: +34 91 322 64 89
Fax: +34 91 322 64 48
[email protected]<mailto:[email protected]>
www.tragsa.es<http://www.tragsa.es>
En beneficio del medio ambiente, imprime este e-mail sólo si realmente es
necesario.
________________________________
El consumo de papel es perjudicial para el medio ambiente. Por favor, tengalo
en cuenta antes de imprimir este mensaje.
AVISO LEGAL: Este mensaje y sus anexos pueden contener informacion confidencial
o legalmente protegida. Esta dirigido unicamente a la persona o entidad
indicada como destinatarios del mensaje. Si este mensaje le hubiera llegado por
error, por favor eliminelo sin revisarlo ni reenviarlo y notifiquelo
inmediatamente al remitente.
________________________________
<<inline: image001.png>>
------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev
_______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
