[mapserver-users] GetFeature WFS request with Spatial Filter DWITHIN
Rahkonen Jukka (MML)
jukka.rahkonen at maanmittauslaitos.fi
Mon Apr 27 08:06:11 PDT 2020
Hi,
The DWithin function in WFS is a true/false function just like the equivalent PostGIS function https://postgis.net/docs/ST_DWithin.html. You can’t find the nearest feature with DWithin. A not so good workaround is to increase the distance until the result is not empty.
Mapserver does not have a vendor specific function for nearest either like Geotools/Geoserver. Especially the pgnearest function that works with PostGIS backend and returns n nearest features would be practical for your use case https://docs.geotools.org/stable/userguide/library/main/function_list.html. Geotools should also have a similar function for Oracle that is using the native SDO_NN function.
Unfortunately I can’t say how to proceed for making nearest or nearestN queries with Mapserver.
-Jukka Rahkonen-
Lähettäjä: mapserver-users <mapserver-users-bounces at lists.osgeo.org> Puolesta Fran Acuña Parra
Lähetetty: maanantai 27. huhtikuuta 2020 16.59
Vastaanottaja: mapserver-users at lists.osgeo.org
Aihe: [mapserver-users] GetFeature WFS request with Spatial Filter DWITHIN
Hi,
Following the topic about another question that I sent, I'm using a Getfeature WFS request with a DWITHIN spatial filter to returns the closes feature of a layer given some specific coordinates. The request works fine, but when there are several features that match the filter it doesn't returns the closest one in the first position of the response(GML for example). Is there a way to achieve this?
Thanks in advance.
Regards,
Fran Acuña
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20200427/15d62966/attachment.htm>
More information about the MapServer-users
mailing list