[OpenLayers-Dev] WFS multipolygon query

Alexandre Djioev djioev at gmail.com
Wed Nov 24 17:54:41 EST 2010


Hi everyone,

I have the following problem to solve:

Environment: Geoserver, Openlayers + GeoExt

1) User loads a layer with polygons, say with postcode areas.
2) User selects one or many of those polygons and then adds them into
feature list.
3) Users does WFS request to some other layer with points (say hotel
locations) that are inside of selected polygons.

So here are some things I have tried:
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).
2) We build OL Filter with type = Intersects and pass value to our
featureList. (Not possible, I don't think we can build appropriate WFS
request)
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.
4) Sending requests for each polygon one-by-one sounds is a bit dumb...

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?

Thanks Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20101125/adc23085/attachment.html


More information about the Dev mailing list