On Fri, Jun 10, 2011 at 5:43 PM, David R Robison <[email protected]> wrote: > I am using the following WFS filer against a postgis database > > <ogc:Filter> > <ogc:DWithin> > <ogc:PropertyName>vagis:the_geom</ogc:PropertyName> > <gml:Point><gml:coordinates>-77.9001,38.875</gml:coordinates></gml:Point> > <ogc:Distance>.02</ogc:Distance> > </ogc:DWithin> > </ogc:Filter> > > I do have a gist spatial index on the "the_geom" attribute. However, > when I look at the query sent to the postgis database it is not using > the index. It looks like geoserver is trying to read all the records and > then perform its own dwithin search rather than using postgis's function > and index. We are using an old version of geoserver (1.7.6). Is there > something I am doing wrong or is this a problem because I'm on an old > version if geoserver? Is there a way to force the query to use the > spatial index?
Wow, lots of people stuck with 1.7.6... what was wrong with the 2.0.x series? :-) Anyways, just checked the code of 2.1.0 and it definitely encodes the filter into sql. Not sure about 1.7.6, was too long ago. Could not find a report in jira, it may be that nobody ever noticed. Cheers Andrea -- ------------------------------------------------------- Ing. Andrea Aime GeoSolutions S.A.S. Tech lead Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 962313 http://www.geo-solutions.it http://geo-solutions.blogspot.com/ http://www.youtube.com/user/GeoSolutionsIT http://www.linkedin.com/in/andreaaime http://twitter.com/geowolf ------------------------------------------------------- ------------------------------------------------------------------------------ EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev _______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
