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

bartvde at osgis.nl bartvde at osgis.nl
Mon Jun 30 02:30:40 PDT 2008


<4864E58F.1020007 at neogeo-online.net>
<4864E781.7010809 at dmsolutions.ca> <4868A508.6020008 at neogeo-online.net>
Message-ID: <3fa2d6410a8df0a7b10f97bce0857f39 at pop02.backbone.tiscomhosting.nl>
X-Sender: bartvde at osgis.nl
Received: from b50-11.minvenw.nl [145.50.39.11] with HTTP/1.1 (POST); Mon, 30
	Jun 2008 11:30:40 +0200
User-Agent: RoundCube Webmail/0.1
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit

No Mapserver is right in this case it uses SLD 1.0 which is tied to Filter
1.0, see:

http://schemas.opengis.net/filter/1.0.0/filter.xsd

<xsd:attribute name="escape" type="xsd:string" use="required"/>

Btw, in Filter 1.1 the OGC changed this to:

http://schemas.opengis.net/filter/1.1.0/filter.xsd

<xsd:attribute name="escapeChar" type="xsd:string" use="required"/>

Best regards,
Bart

On Mon, 30 Jun 2008 11:19:04 +0200, Guillaume Sueur
<guillaume.sueur at neogeo-online.net> wrote:
> 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
>>>>    




More information about the MapServer-users mailing list