I have the following filter:
function getFilter(polygon) {
var filter =
'<ogc:Filter>' +
'<ogc:Intersects>' +
'<ogc:PropertyName>the_geom</ogc:PropertyName>' +
'<ogc:Function name="collectGeometries">' +
'<ogc:Function name="queryCollection">' +
'<ogc:Literal>ws:layer_2</ogc:Literal>' +
'<ogc:Literal>the_geom</ogc:Literal>' +
'<ogc:Literal>INTERSECTS(the_geom,' + polygon + ')</ogc:Literal>' +
'</ogc:Function>' +
'</ogc:Function>' +
'</ogc:Intersects>' +
'</ogc:Filter>';
return filter;
}
I've incorporated this filter in a gs:Aggreate WPSExecute request. However, processing takes a very long time, sometimes even reaching a minute. All operations are on my localhost.
Tips on how to improve performance of WPS requests will be highly appreciated. I'm using GeoServer 2.1.3, PostGIS 1.5, and OpenLayers 2.11.