I'm still having trouble with this, so testing out with a simpler dataset. I can get the unfiltered data to display,but I can't get the filter to work.
This is the layer definition in my OpenLayers init() function:
var sppfilter = "taxa_taxon_list_id=3";
// create WMS tetrads layer - individual species can be filtered on
var wmstetrads = new OpenLayers.Layer.WMS(
"Tetrads",
"http://www.alanhale.co.uk:8080/geoserver/gwc/service/wms",
{'layers': 'indicia_test:detail_occurrences', 'CQL_FILTER':sppfilter,'format':'image/png', 'transparent':'true'},
{'opacity': 0.6, 'isBaseLayer': false, 'visibility': true}
);
And here is my parameterFilter in geowebcache.xml:
<parameterFilters>
<regexParameterFilter>
<key>taxa_taxon_list_id</key>
<defaultValue>1</defaultValue>
<regex>^(.+)$</regex>
</regexParameterFilter>
</parameterFilters>
Grateful for any further guidance
Alan
On 28/11/2010 18:48, Arne Kepp wrote:
The key is correct. The floatParameterFilter tries to avoid duplicates, but in order to do so it needs to know all the possible values*.
A regexParameterFilter just treats the numbers as a text, and matches it againt a pattern. So it doesn't need to know the 6000 values in advance.
-Arne
*: If you code, you know how you never compare floating point numbers directly, you just check that the difference is sufficiently small? This is the same idea.
On 11/28/10 12:53 PM, Alan Hale wrote:
Thank you Arne
I'm not sure I understand the second point. My filter looks like this:
"specid=x" where x is a decimal value from one of over 6000
possibilities. They are all of the same format. I assume "specid" is
entered within the<key> element tags.
Alan
On 28/11/2010 10:16, Arne Kepp wrote:
Yes, you'll have to construct a configuration file. Make sure you give
layers new names, otherwise you'll have a hard time finding errors.
If you want a wildcard filter you should use the regular expression
filter, and set it up for the types of numbers your backend supports.
Note that GWC currently provides no facilities for seeding or removing
tiles that use such filters.
-Arne
On 11/28/10 10:58 AM, Alan Hale wrote:
Many thanks Arne
So, if I understand correctly, I have to construct my own
geowebcache.xml which will include details of any layer for which I wish
to call GWC, and place under data_dir/gwc/.
Can I assume that (in<floatParameterFilter>) the<values> entries are
optional? My values can be any one of over 6000 decimal numbers. In
fact, am I expecting too much of GWC to cope with this in any case?
Regards
Alan
On 26/11/2010 15:03, Arne Kepp wrote:
Hi,
have a look at
https://github.com/GeoWebCache/geowebcache/blob/1.1.2/geowebcache/src/main/resources/geowebcache.xml
-Arne
On 11/26/10 3:24 PM, Alan Hale wrote:
Hi
I am just starting to look at GeoWebCache (I'm with
Geoserver-2.0.2) and
see from the documentation that you can use Parameter Filters to
handle
CQL filters set by the client - which is just what I need. But the
documentation is incomplete and refers the reader to the comprehensive
configuration example and the XSD documentation. The configuration
example also says TODO and there are no details. I cannot find
relevant
XSD documentation. Could anyone kindly give me some pointers?
Many thanks
Alan Hale
__________ Information from ESET Smart Security, version of virus signature database 5656 (20101128) __________
The message was checked by ESET Smart Security.
http://www.eset.com