[mapserver-users] WMS, SLD, FilterEncoding and PropertyIsLike

Guillaume Sueur guillaume.sueur at neogeo-online.net
Mon Jun 30 05:19:04 EDT 2008


Folks, I've found the trick !

Where OGC SLD specification says :
<PropertyIsLike wildCard="*" singleChar="#" escapeChar="!">

MapServer wants :
<PropertyIsLike wildCard="*" singleChar="#" escape="!">

Using the first expression with MapServer causes the filter set with it 
to apply to every records.

Should I submit a ticket for this ?

Guillaume


Yewondwossen Assefa a écrit :
> Guillaume,
> 
>  Attaches is an sld I use for testing and mapsever returns the expected 
> results. If you do not mind sharing your sld, you can send it to me and 
> I can have a look.
> 
> Best Regards,
> 
> Guillaume Sueur wrote:
>> actually it helped me going further in my analysis :
>> when I use PropertyIsLike, it traps all the records, even those non 
>> matching with the pattern.
>> Is that a mapserver bug on WMS-SLD handling  ?
>>
>> Thanks
>>
>>
>>
>> Oscar Gomez a écrit :
>>> Hi Guillaume,
>>>  
>>> In the past it worked for me, but I had to look very carefully at the 
>>> symbology specification from OGC.
>>>  
>>> Here you are my example:
>>>  
>>> <sld:Rule>
>>> * * <sld:Name />
>>> *-* <http://www12.asphost4free.com/ogomez2/temp/wise.xml#> <sld:Title>
>>> *-* <![CDATA[
>>>
>>>  
>>> * * ]]>
>>> * * </sld:Title>
>>> *-* <http://www12.asphost4free.com/ogomez2/temp/wise.xml#> <ogc:Filter>
>>> *-* <http://www12.asphost4free.com/ogomez2/temp/wise.xml#> 
>>> <ogc:PropertyIsLike wildCard="***" singleChar="*#*" escapeChar="*!*">
>>> * * *> *
>>> * * <ogc:PropertyName>*ORIGENAGUA*</ogc:PropertyName>
>>> * * <ogc:Literal>*Subter**</ogc:Literal>
>>> * * </ogc:PropertyIsLike>
>>> * * </ogc:Filter>
>>> *-* <http://www12.asphost4free.com/ogomez2/temp/wise.xml#> 
>>> <sld:PolygonSymbolizer>
>>> *-* <http://www12.asphost4free.com/ogomez2/temp/wise.xml#> <sld:Fill>
>>> *-* <http://www12.asphost4free.com/ogomez2/temp/wise.xml#> 
>>> <sld:GraphicFill>
>>> *-* <http://www12.asphost4free.com/ogomez2/temp/wise.xml#> <sld:Graphic>
>>> *-* <http://www12.asphost4free.com/ogomez2/temp/wise.xml#> <sld:Mark>
>>> * * <sld:WellKnownName>*circle*</sld:WellKnownName>
>>> *-* <http://www12.asphost4free.com/ogomez2/temp/wise.xml#> <sld:Fill>
>>> * * <sld:CssParameter name="*fill*">*#A87000*</sld:CssParameter>
>>> * * <sld:CssParameter name="*fill-opacity*">*1.0*</sld:CssParameter>
>>> * * </sld:Fill>
>>> * * </sld:Mark>
>>> * * <sld:Size>*1*</sld:Size>
>>> * * </sld:Graphic>
>>> * * </sld:GraphicFill>
>>> * * </sld:Fill>
>>> *-* <http://www12.asphost4free.com/ogomez2/temp/wise.xml#> <sld:Stroke>
>>> * * <sld:CssParameter name="*stroke*">*#A87000*</sld:CssParameter>
>>> * * <sld:CssParameter name="*stroke-width*">*1*</sld:CssParameter>
>>> * * <sld:CssParameter name="*stroke-opacity*">*1*</sld:CssParameter>
>>> * * </sld:Stroke>
>>> * * </sld:PolygonSymbolizer>
>>> * * </sld:Rule>
>>>
>>>  
>>>
>>>  
>>> I hope you find it useful. Best,
>>>  
>>> Oscar
>>>
>>>
>>> On Fri, Jun 27, 2008 at 10:00 AM, Guillaume Sueur 
>>> <guillaume.sueur at neogeo-online.net 
>>> <mailto:guillaume.sueur at neogeo-online.net>> wrote:
>>>
>>>     Hi
>>>
>>>     Has anyone ever had a PropertyIsLike filter working on a WMS layer ?
>>>     I have an SLD file with several rules, all of them with
>>>     PropertyIsEqualTo Filter. It works ok.
>>>     If I change one of these to PropertyIsLike (I add wildcard,
>>>     singleChar and escapeChar as well), they ALL go wrong, none of the
>>>     filters being used. All my objects are then shown with the default
>>>     representation placed at the end of the file without any filter.
>>>
>>>     Any idea about this strange behaviour ?
>>>
>>>     Thanks
>>>     --     Guillaume
>>>     _______________________________________________
>>>     mapserver-users mailing list
>>>     mapserver-users at lists.osgeo.org 
>>> <mailto:mapserver-users at lists.osgeo.org>
>>>     http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>
>>>
>>>
>>>
>>> -- 
>>> Oscar Gomez
>>>
>>> Visita mi blog!! http://ogomez2.blogspot.com
>>
> 
> 


More information about the mapserver-users mailing list