[mapserver-users] GetFeature WFS request with Spatial Filter DWITHIN

Steve Lime sdlime at gmail.com
Mon Apr 27 11:42:07 PDT 2020


To be clear, Fran - are you saying the issue isn't the result set rather
the order? If so I don't know of a way to affect that order.

In terms of a nearest feature or features. This would be something that I
would be keen on addressing. I've run into a variant of this issue using
the CGI and mode=query when searching multiple layers. The query finds the
first matching feature but not necessarily the closest. It's an issue
primarily with line and point layers when you need to set TOLERANCE values
to make things clickable. Jukka, what does the vendor specific extension in
GeoServer look like from WFS filter standpoint?

--Steve

On Mon, Apr 27, 2020 at 10:21 AM Rahkonen Jukka (MML) <
jukka.rahkonen at maanmittauslaitos.fi> wrote:

> 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
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20200427/1870123a/attachment.htm>


More information about the MapServer-users mailing list