Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to query/filter my wms in openlayers to only see the polygons classified with the highest values in a given field.

Would be something like:

wms_layer.mergeNewParams({'CQL_FILTER': "ND = max(ND)"});

But this is not working.

Any ideas?

share|improve this question

There is no way to do that. If you want to get the highest value of a filed you have to use WPS, GeoServer has a process that does basic statistics on fields, including the max value.

share|improve this answer
How do I do this? – vascobnunes Dec 7 '12 at 14:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.