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;gem_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?
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
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;gem_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.