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 have a set of layers, each covering one country. In my OpenLayers client, I enable users to randomly draw a polygon. A user is then able to perform analysis based on the drawn polygon. Analysis include getting the population covered by the polygon, population density of the area covered by the polygon, etc.

This separation of data into separate layers is for performance reasons, as there are millions of grid record data. Putting all this data in one layer is likely to degrade performance considerably.

The Problem:

This works perfectly within a single country, which is represented by a single layer in GeoServer. However, I want to enable users to draw a polygon that covers sections in more than one country. This means that to perform the analysis, data must be extracted from all the affected layers. I'm looking for a pure OpenLayers+GeoServer approach of achieving this. The features extracted are then passed to a GeoServer WPS process.

My attempt so far:

I've created one layer group that includes all the layers for all the countries. I wish to load as minimal data as possible to the client. Which means I can't use WMSGetFeatureInfo, or the WFS version that retrieves information based on a WMS layer. Which means that the layer group approach may not be the appropriate one.

All my processing is done in WPS processes. It's only the result that is sent to the OpenLayers client.

Any suggestions will be appreciated very much.

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

share|improve this question
up vote 1 down vote accepted

Layer groups have no meaning in WFS, but a WFS request can actually query multiple feature types. In XML POST request you just include multiple Query elements, with KVP you can list the different feature types as a comma separate list and an eventual CQL filter should be ; separated

share|improve this answer
Thanks Andrea. I'll check out KVP. I've never used it before. – okello Aug 3 '12 at 9:44

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.