[mapserver-users] layerObj.setFilter parser error
Radim Blazek
radim.blazek at gmail.com
Tue Jan 17 04:44:13 PST 2012
Unfortunately I found a similar problem with parser if PolygonFromText
is used in filter.
I filled a ticket http://trac.osgeo.org/mapserver/ticket/4158
Radim
On Sun, Jan 15, 2012 at 4:27 PM, Lime, Steve D (DNR)
<Steve.Lime at state.mn.us> wrote:
> Good catch, that's an obscure bug. Can you file a ticket?
>
> Steve
>
> ________________________________________
> From: Radim Blazek [radim.blazek at gmail.com]
> Sent: Saturday, January 14, 2012 7:47 AM
> To: Lime, Steve D (DNR)
> Cc: mapserver-users at lists.osgeo.org
> Subject: Re: [mapserver-users] layerObj.setFilter parser error
>
> On Thu, Jan 12, 2012 at 12:18 AM, Lime, Steve D (DNR)
> <Steve.Lime at state.mn.us> wrote:
>> I don't know of a simple work around. MapScript and the mapfile parser use the same expression tokenizing routine. What happens if you try single quotes? That is:
>>
>> layerObj.setFilter ( '(point.id = 1)' )
>
> Single quotes don't help.
>
> I have discovered that the problem is key (?) word 'point', "pokus.id
> = 1" for example, and other table names work well.
>
> As a work around I was able to use "true and (point.id = 1)".
>
> Radim
>
>
>> Steve
>>
>> -----Original Message-----
>> From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Radim Blazek
>> Sent: Tuesday, January 10, 2012 12:05 PM
>> To: mapserver-users at lists.osgeo.org
>> Subject: [mapserver-users] layerObj.setFilter parser error
>>
>> If I use layerObj.setFilter ( "(point.id = 1)" ), mapObj.OWSDispatch
>> gives an error:
>>
>> "msTokenizeExpression(): Expression parser error. Parsing time value failed.
>> msParseTime(): Regular expression error. Unrecognized date or
>> time format ()."
>>
>> It works correctly with layerObj.setFilter ( "( id = 1)" ) or
>> layerObj.setFilter ( "point.id = 1" ).
>> FILTER "( point.id = 1 )" in mapfile also works.
>> This is of course only a simple example, I need both fully qualified
>> column name and parenthesis.
>>
>> It seems to be a bug. Do you know any simple trick, how to get it
>> working for a presentation tomorrow morning?
>>
>> Version 6.0.1.
>>
>> Thanks
>> Radim
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>>
>
>
More information about the MapServer-users
mailing list