<meta charset="utf-8"><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; color: rgb(34, 34, 34); ">Hi everyone,<br><br>I have the following problem to solve:<br>
<br>Environment: Geoserver, Openlayers + GeoExt<br><br>1) User loads a layer with polygons, say with postcode areas.<br>2) User selects one or many of those polygons and then adds them into feature list.<br>3) Users does WFS request to some other layer with points (say hotel locations) that are inside of selected polygons.<br>
<br>So here are some things I have tried:<br>1) When user clicks we do GetFeatureInfo and get polygon id, push it into featureList array, highlight polygon. User can add many polygons. (can do, and it works well if polygon geometry is big).<br>
2) We build OL Filter with type = Intersects and pass value to our featureList. (Not possible, I don&#39;t think we can build appropriate WFS request)<br>3) Instead of polygon ids collect polygon geometries. It will work if I have only one polygon, but OpenLayers.Filter.Spatial accepts  {OpenLayers.Bounds || OpenLayers.Geometry} not collection. But even if collection is supported I guess polygon aggregation operation might take too long.<br>
4) Sending requests for each polygon one-by-one sounds is a bit dumb...<br><br>Should I try to install WPS and write specific process for it, something like send polygon ids, fetch and aggregate them, do WFS query, return result?  What is the optimal solution?<br>
<br>Thanks Alex<br></span>