Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

share|improve this question
    
A few things will improve this question: an explanation of what you are actually trying to do; the SQL statement that GeoServer is sending to PostGIS (set logging to verbose); The query explanation from PostGIS which shows which (if any) indexes are being used. (You'll need to paste the query into pgadmin to get this). –  iant Jul 17 '12 at 12:34
    
Thanks Iant. I'll do that a little later. On the other hand, I'm thinking that since I'm just sending a WPS request using OpenLayers, my optimization options would be limited to GeoServer Tuning. The client only parses the request, and response; it's GeoServer that does the heavy lifting. As for the database, it's GeoServer that interacts with it And, I had to disable database optimization options in order to get all the records aggregated. –  okello Jul 17 '12 at 13:11
add comment

1 Answer 1

up vote 1 down vote accepted

Have you already followed the instructions here and added the -Dorg.geotools.filter.function.simplify=true among the JVM parameters ?

If so there is little else that can be done beside teaching GeoServer to do a proper spatial join in the database, something that would take several days of coding.

share|improve this answer
    
Yes Andrea, I'd done that. But thanks. I was hoping there are other tips besides this one, and disabling unused services. –  okello Jul 17 '12 at 18:32
1  
Nope, if you already did that there is nothing left but to either switch to faster CPUs (not more CPUs, faster ones) or hard code your desired processing logic to make it faster. –  Andrea Aime Jul 18 '12 at 19:57
    
Thanks a lot, Andrea. –  okello Jul 19 '12 at 6:04
add comment

Your Answer

 
discard

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.