Opened 17 years ago
Closed 14 years ago
#2147 closed defect (fixed)
Filter logical operator <OR> not working properly in SLD
Reported by: | capgree | Owned by: | assefa |
---|---|---|---|
Priority: | normal | Milestone: | 5.6 release |
Component: | WMS Server | Version: | |
Severity: | normal | Keywords: | SLD Filter OR operator |
Cc: |
Description
It seems that values entered in Filter expressions in SLD rules which use the logical operator OR are not used properly in some cases. I noticed this when combining numeric and string values. I.e. (QUALI is a text field from a shapefile)
1 - This will work:
<Filter> <PropertyIsEqualTo> <PropertyName>QUALI</PropertyName> <Literal>24</Literal> </PropertyIsEqualTo> </Filter>
2 - This will also work:
<Filter> <PropertyIsEqualTo> <PropertyName>QUALI</PropertyName> <Literal>24a</Literal> </PropertyIsEqualTo> </Filter>
3 - But this will fail:
<Filter> <OR> <PropertyIsEqualTo> <PropertyName>QUALI</PropertyName> <Literal>24</Literal> </PropertyIsEqualTo> <PropertyIsEqualTo> <PropertyName>QUALI</PropertyName> <Literal>24a</Literal> </PropertyIsEqualTo> </OR> </Filter>
4 - Althought this will work:
<Filter> <OR> <PropertyIsEqualTo> <PropertyName>QUALI</PropertyName> <Literal>11x</Literal> </PropertyIsEqualTo> <PropertyIsEqualTo> <PropertyName>QUALI</PropertyName> <Literal>24a</Literal> </PropertyIsEqualTo> </OR> </Filter>
Change History (3)
comment:1 by , 17 years ago
Component: | AGG → WMS Server |
---|---|
Owner: | changed from | to
comment:2 by , 16 years ago
Milestone: | → 5.2 release |
---|---|
Status: | new → assigned |
comment:3 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Update since the last comment is that, it is possible now to specify the field type matada ows/wfs/gml_[item name]_type (see #3052). Closing.
Note:
See TracTickets
for help on using tickets.
The fact that QUALI is a text field is not known to the filler encoding. There is an assumption done based on the value, so that if the value is a number, It is assumed thate the attrubute is a number and if the value is not a number, It is assumed to be a text field. So you could end up with expressions such as ([QUALI] = 24) and ("[QUALI]" = "24a"). Could this explain you problem?
Please also check http://trac.osgeo.org/mapserver/ticket/2635 since It allows you to see the temporary map file after the sld is applied.