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 generated the WPS request below using GeoServer's WPS Request Builder. I wish to append more parameters to this request (geometry selection), and then send it either using GET or POST from within my OpenLayers JavaScript code. I can't seem to get information on how this can be done. How can I append geometry selection parameter to the request, and how can I send the request using OpenLayers? Any assistance will highly appreciated.

<?xml version="1.0" encoding="UTF-8"?>
<wps:Execute version="1.0.0" service="WPS" xmlns:xsi="" xmlns="" xmlns:wfs="" xmlns:wps="" xmlns:ows="" xmlns:gml="" xmlns:ogc="" xmlns:wcs="" xmlns:xlink="" xsi:schemaLocation="">
      <wps:Reference mimeType="text/xml; subtype=wfs-collection/1.0" xlink:href="http://geoserver/wfs" method="POST">
          <wfs:GetFeature service="WFS" version="1.0.0" outputFormat="GML2">
            <wfs:Query typeName="learning_workspace:pop_layer"/>
    <wps:RawDataOutput mimeType="text/xml">

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

share|improve this question
up vote 2 down vote accepted

Incorporate filters within the <wfs:Query><wfs:Query/> section in a <Filter></Filter>. The format of the filter is dependent on its type. More info on filters and examples is available here and here.

As for requests, I used OpenLayers' POST method to send request, as illustrated below:

var request = new OpenLayers.Request.POST({
        url: WPS_HOST,
        data: wpsRequestData,
        headers: {
            "Content-Type": "text/xml;charset=utf-8"
        callback: function (response) {
            //read the response from GeoServer
            var gmlParser = new OpenLayers.Format.GML();
            var xmlSum =;
            // TODO: More operations here
        failure: function (response) {
            alert("Something went wrong in the request");

I hope this will be of help to someone.

share|improve this answer

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.