[Geoserver-users] cql_filter and string encoding

Hi Justin
I’m using 1.6.3 and I tried it with 1.6.x trunk and the 1.7.alpha. Same errors… Here is my OpenLayer definition:

var waiting = new OpenLayers.Layer.WMS(
“infogrips”,
http://srsofaioi12288:8080/geoserver/wms”,
{
srs: ‘EPSG:21781’,
layers: ‘topp:geo_gemeinden_v’,
transparent: ‘true’,
tiled: ‘true’,
format: ‘image/png’,
styles: ‘av_meta_waiting’,
CQL_FILTER: ‘gem_bfs=2601+OR+gem_bfs=2513’
}
,
{
‘isBaseLayer’: false, ‘visibility’: false, ‘buffer’: 0
}
);

regards
Stefan

-----Ursprüngliche Nachricht-----
Von: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Gesendet am: Freitag, 2. Mai 2008 00:19
An: Ziegler Stefan
Cc: geoserver-users
Betreff: Re: [Geoserver-users] cql_filter and string encoding

Hi Stephan,

What version of GeoServer are you using? I know a while back there was
an issue with cql filters similar to this one. I also tried an or filter
similar to this one and it worked ok.

If you are using pre 1.6.1 please upgrade. If not can you include the
source of the openlayers map. Thanks.

-Justin

Ziegler Stefan wrote:

Hi
I have a problem using cql_filter with a “OR” statement. The filter
looks like this: “cql_filter: ‘gem_bfs=2520+OR+gem_bfs=2521’” (as option
in a OpenLayers layer definition). OpenLayers (or is it the browser??)
then encodes the filter to: “gem_bfs%3D2520%2BOR%2Bgem_bfs%3D2521”. The
“%3D” would work but encoded ±sign (“%2B”) results in a wms exception:

<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE

ServiceExceptionReport SYSTEM
http://schemas.opengis.net/wms/1.1.1/WMS_exception_1_1_1.dtd”>

Could not parse CQL filter list.Encountered "OR" at line 1,
column 14.
Was expecting one of:
<STRING_LITERAL> …
"true" …
"false" …
"(" …
"[" …
<INTEGER_LITERAL> …
<FLOATING_LITERAL> …
<IDENTIFIER> …
: gem_bfs=2520+OR+gem_bfs=2521, Current Token : +
Encountered "OR" at line 1, column 14.
Was expecting one of:
<STRING_LITERAL> …
"true" …
"false" …
"(" …
"[" …
<INTEGER_LITERAL> …
<FLOATING_LITERAL> …
<IDENTIFIER> …
: gem_bfs=2520+OR+gem_bfs=2521, Current Token : +
Encountered "OR" at line 1, column 14.
Was expecting one of:
<STRING_LITERAL> …
"true" …
"false" …
"(" …
"[" …
<INTEGER_LITERAL> …
<FLOATING_LITERAL> …
<IDENTIFIER> …

regards
Stefan

Mit freundlichem Gruss
Stefan Ziegler
Leiter Aufsicht

Kanton Solothurn
Bau- und Justizdepartement
Amt für Geoinformation
Rötistrasse 4
4501 Solothurn
Telefon 032 627 75 96
Telefax 032 627 75 98
stefan.ziegler@anonymised.com
http://www.so.ch

!DSPAM:4007,4819f53a278095409313003!



This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don’t miss this year’s exciting event. There’s still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

!DSPAM:4007,4819f53a278095409313003!



Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,4819f53a278095409313003!


Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com

Ziegler Stefan ha scritto:

Hi Justin
I'm using 1.6.3 and I tried it with 1.6.x trunk and the 1.7.alpha. Same errors... Here is my OpenLayer definition:

var waiting = new OpenLayers.Layer.WMS(
"infogrips",
"http://srsofaioi12288:8080/geoserver/wms&quot;,
{
srs: 'EPSG:21781',
layers: 'topp:geo_gemeinden_v',
transparent: 'true',
tiled: 'true',
format: 'image/png',
styles: 'av_meta_waiting',
CQL_FILTER: 'gem_bfs=2601+OR+gem_bfs=2513'

Hmmm.... shouldn't it be the work of the browser to url-encode the
spaces? What if you remove the plug sign and replace them with spaces?
Cheers
Andrea