[Geoserver-users] using wms spatial filters to specify nearest neighbour query ?

Hi,

How do I specify a nearest neighbour query using wms spatial filters (or CQL) ? or is this possible in Geoserver ? if it is, what postgis function is used in this operation ?

thanks,

Roman

Roman Isitua ha scritto:

Hi,

How do I specify a nearest neighbour query using wms spatial filters (or CQL) ? or is this possible in Geoserver ? if it is, what postgis function is used in this operation ?

No, there is no such a function, and afaik PostGIS does not have
a nearest neighbour function either.
Some time ago a user contributed a a WFS extension that
did exactly that, added a WFS method called GetNearest.
Unfortunately the extension has not been maintained and has
never been shipped along with GeoServer.
Anyways, you can still find it here:
http://svn.codehaus.org/geoserver/branches/1.6.x/geoserver/community/WFSGetNearest/

For the future, this kind of operation should be implemented
as a WPS call, since it's actually processing, but don't hold
your breath on it, month may pass before we have a usable WPS
service

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.