[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 paint?

How can I obtain somethin similar to:

ID **1,2,3,4,7,34,65,98**

Thanks in advance

Best regards











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



[hidden email]



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.



View this message in context: How to group values in SLD
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hello Pedro,

not unfortunately not to my knowledge. You need to do it like this:

            <ogc:Filter>
                <ogc:Or>
                <ogc:PropertyIsEqualTo>
                    <ogc:PropertyName>ID</ogc:PropertyName>
                    <ogc:Literal>1</ogc:Literal>
                </ogc:PropertyIsEqualTo>
                <ogc:PropertyIsEqualTo>
                    <ogc:PropertyName>ID</ogc:PropertyName>
                    <ogc:Literal>2</ogc:Literal>
                </ogc:PropertyIsEqualTo>
                <ogc:PropertyIsEqualTo>
                    <ogc:PropertyName>ID</ogc:PropertyName>
                    <ogc:Literal>3</ogc:Literal>
                </ogc:PropertyIsEqualTo>
        ....................
                    </ogc:Or>
            </ogc:Filter>

Cheers

Christian

-----
____________________________

Dr Christian Maul
Project Manager

Information Services Branch
Department of Sustainability and Environment
Level13, Marland House, 570 Bourke Street
Melbourne 3000

PO Box 500, East Melbourne Vic 3002

Telephone: +61-3-8636 2325
Telefax: +61-3-8636 2813
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/How-to-group-values-in-SLD-tp5059193p5059251.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Pedro,

Check out whether transformation functions may be helpful in your case:

http://docs.geoserver.org/latest/en/user/styling/sld-tipstricks/transformation-func.html

These functions typically allow you to define your visualisation rules more concisely.

Kind regards,

Edward

Date: Mon, 10 Jun 2013 16:41:48 -0700
From: Christian.Maul@anonymised.com
To: geoserver-users@anonymised.comrceforge.net
Subject: Re: [Geoserver-users] How to group values in SLD

Hello Pedro,

not unfortunately not to my knowledge. You need to do it like this:

ogc:Filter
ogc:Or
ogc:PropertyIsEqualTo
ogc:PropertyNameID</ogc:PropertyName>
ogc:Literal1</ogc:Literal>
</ogc:PropertyIsEqualTo>
ogc:PropertyIsEqualTo
ogc:PropertyNameID</ogc:PropertyName>
ogc:Literal2</ogc:Literal>
</ogc:PropertyIsEqualTo>
ogc:PropertyIsEqualTo
ogc:PropertyNameID</ogc:PropertyName>
ogc:Literal3</ogc:Literal>
</ogc:PropertyIsEqualTo>

</ogc:Or>
</ogc:Filter>

Cheers

Christian



Dr Christian Maul
Project Manager

Information Services Branch
Department of Sustainability and Environment
Level13, Marland House, 570 Bourke Street
Melbourne 3000

PO Box 500, East Melbourne Vic 3002

Telephone: +61-3-8636 2325
Telefax: +61-3-8636 2813

View this message in context: http://osgeo-org.1560.x6.nabble.com/How-to-group-values-in-SLD-tp5059193p5059251.html
Sent from the GeoServer - User mailing list archive at Nabble.com.


This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users