[OpenLayers-Users] pass bounding box with WFS url to server

Phil Scadden p.scadden at gns.cri.nz
Wed Nov 13 14:03:49 PST 2013


> Dear Users,
>      I am calling WFS layer and its calling the entire WFS layer, I need to
> call the layer of a particular bounding box and this must be returned from
> the Geoserver. Can anyone help me how to fire a request to Geoserver with
> bounding box in url itslef?
>
> As of now I had used BBOX filter and calling maxextent in the wfs which is
> giving me the feature inside the BBOX but its calling the entire layer from
> the server and then filtering and giving to me which is too time consuming
> as I have to work with world data which has more than 40k features.
My two cents. Rethink the application design.

In general WFS layers are a really bad idea. Do everything on the server 
that you possibly can.  With WFS you are slowed by large network data 
traffic and more importantly, the limitations of javascript compared to 
whatever the server is running. You want to use WMS layers to maximize 
speed and use WFS for queries.
See maybe 
http://lists.osgeo.org/pipermail/openlayers-users/2012-February/023918.html
(use a spatial bbox filter instead).

Note also, a very useful function that I think isnt documented well:
OpenLayers.Protocol.WFS.fromWMSLayer(layer)
Ie create layer as a WMS layer and this function returns a wfs protocol 
object for it that you can use for querying.

Notice: This email and any attachments are confidential.
If received in error please destroy and immediately notify us.
Do not copy or disclose the contents.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20131114/c9d4dbbf/attachment.html>


More information about the Users mailing list