[Geoserver-users] cql filter with wms group layers

http://jira.codehaus.org/browse/GEOS-2614

Don’t know if it’s a bug so I marked it as improvement.

regards
Stefan

-----Ursprüngliche Nachricht-----
Von: Andrea Aime [mailto:aaime@anonymised.com]
Gesendet am: Samstag, 7. Februar 2009 09:42
An: Ziegler Stefan
Cc: geoserver-users
Betreff: Re: [Geoserver-users] cql filter with wms group layers

Ziegler Stefan ha scritto:

Hi
when trying to apply a cql filter statement to a wms group
layer and a
single wms layer I got some error:

“7 layers requested, but found 2 filters specified. When
you specify the
FILTER parameter, you must provide just one, that will be
applied to all
layers, or exactly one for each requested layer”

The request looks like this:

…&layers=Bodenbedeckung,suche_parzelle&cql_filter=INCLUDE;ge
m_bfs=2407+AND+nummer=1527&…"

The error message makes sense, since the first layer is a
wms group with
6 layers. Is there a way to filter the single wms
layer(without knowing
the quantity of layers in the group)? It seems that
GeoServer knows the
number of layers while parsing the cql_filter statement, so
it could be
possible to apply the “group filter” to all the single
layers in the group?

Layer groups in wms are a sort of a hack. Basically the name you use
for the layer group gets expanded during the request parse phase into
the list of layers, and from there on all the code does not see the
group anymore.
So I believe that in order to have that working you have to manually
specify 6 include filters, and then the one that you actually
want to execute on the last layer.

Anyways, the code should be smart enough to expand the single include
filter into 6 copies… can you file a jira issue?

Cheers
Andrea


Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.