[OpenLayers-Users] How efficient is OpenLayers. Filter. Spatial?

Dave Potts dave.potts at pinan.co.uk
Thu Aug 11 02:21:21 EDT 2011


I have a data set of about 50-70 data points held in a Postgis database,
its served to my Openlayers application via a WFS service implemented by a
geoserver3 war file, running under tomcat.

I don't want to display all of these data points, only those defined by a
boundary of a geometry object.

I can implement this filter by using Postgis to change the source data,
declare a view on the table and use that as a data source in Geoserver, or
implement a  OpenLayers.Filter.Spatial in my Openlayers application.

Q. Which is the most efficient ?

I suspect that using the database which is designed to process data would
be best option, rather using the Openlayers filter which would require
downloading all the vector data to the users browser and removing the
extra data points in the context of the users browser.

I am just wondering if there is any reason why I should choose the
Openlayers filter option, as the only the BBOX, DWithin and Intersects
filters are currently implemented (see
http://dev.openlayers.org/releases/OpenLayers-2.10/doc/apidocs/files/OpenLayers/Filter/Spatial-js.html)



More information about the Users mailing list