You can't have multiple filters in one <Filter> element. However, you can
nest ORs and ANDs as deeply as you like.
<ogc:Or>
<ogc:And>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>*colA*</ogc:PropertyName>
<ogc:Literal>*1*</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>*colB *</ogc:PropertyName>
<ogc:Literal>*2*</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:And>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>*colC*</ogc:PropertyName>
<ogc:Literal>*3*</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Or>
On Fri, Oct 15, 2010 at 4:30 PM, Ricardo Bayley <[email protected]>wrote:
> Hi Fellows,
>
> Do you guys know if it is possible to combine AND and OR filters ?
>
> SQL Ej: (colA = 1 and colB = 2) or colC = 3
>
> SLD Ej.:
>
> <ogc:Filter>
> <ogc:And>
> <ogc:PropertyIsEqualTo>
> <ogc:PropertyName>*colA*</ogc:PropertyName>
> <ogc:Literal>*1*</ogc:Literal>
> </ogc:PropertyIsEqualTo>
> <ogc:PropertyIsEqualTo>
> <ogc:PropertyName>*colB *</ogc:PropertyName>
> <ogc:Literal>*2*</ogc:Literal>
> </ogc:PropertyIsEqualTo>
> </ogc:And>
> <ogc:Or>
> <ogc:PropertyIsEqualTo>
> <ogc:PropertyName>*colC*</ogc:PropertyName>
> <ogc:Literal>*3*</ogc:Literal>
> </ogc:PropertyIsEqualTo>
> </ogc:Or>
> </ogc:Filter>
>
>
> Does this makes any sense ?
> I have not tried it yet, just need something like this, and had no idea how
> to write it down.
>
> Best regards
>
>
> Ricardo
>
>
> ------------------------------------------------------------------------------
> Download new Adobe(R) Flash(R) Builder(TM) 4
> The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
> Flex(R) Builder(TM)) enable the development of rich applications that run
> across multiple browsers and platforms. Download your free trials today!
> http://p.sf.net/sfu/adobe-dev2dev
> _______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users