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

The scenario: I want to present a user with names of polygons from a layer in GeoServer. I then display the polygon(s) whose name(s) the user selected.

What I've done: I have a search box, which allows a user to enter name of a polygon they'd like to see. This works perfectly fine, even for wildcards. I've implemented it using CQL filters.

What I want: Instead of a user entering a name of a polygon, I want to pull all the polygon names and display them to the user for selection. After some research, I found out that my best bet is to use GeoServer's WPS aggregation function gs:Aggregate. I've been looking for examples on how to use this, but no success so far. Can anyone who's had this experience point me in the right direction. I'll also be grateful for any alternative approaches.

My environment: GeoServer 2.1.3, PostGIS 1.5, OpenLayers 2.11.

share|improve this question
up vote 1 down vote accepted

Just use the WPS demo builder in the "demo" section (once you've installed the WPS extension, of course), it will guide you into building a valid request

share|improve this answer
Thanks. That's what I've been trying to do. But I can't figure out what I need to put in the function - AggregationFunction(0-2147483647) field. And, without it, there is always the Process failed during execution java.lang.NullPointerException null error. Any pointers? – okello Jul 2 '12 at 14:00
Ah right, the demo builder still does not know how to handle enumerated attributes. Please run the DescribeProcess (available from the demo builder page) and see what the acceptable values are. – Andrea Aime Jul 2 '12 at 19:41
WPS Describe Process was helpful. However, the only supported functions are Count, Average, Max, Median, Min, StdDev, Sum. I'm not seeing how this can help me get unique names (character data). Or, am I missing something? – okello Jul 3 '12 at 8:49
Ah, you're right, wrong process. There is another one that extracts unique values... Hum.. gs:Unique – Andrea Aime Jul 6 '12 at 7:17
Thanks. Now, that works. – okello Jul 6 '12 at 8:36

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.