[mapserver-users] GetFeature WFS request with Spatial Filter throws an error

Fran Acuña Parra fran.ap89 at gmail.com
Sat Apr 25 12:55:39 PDT 2020


Hi everyone,

I'm new to this list and MapServer and would like some help with an issue
that I'm facing with MapServer.

I'm using the following request in order to get the closest feature from a
layer given some specific coordinates:

http://www.juntadeandalucia.es/medioambiente/mapwms/REDIAM_PPHH_2012/wfs?&VERSION=1.0.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=MSPF_POLY&Filter=<Filter><DWithin><PropertyName>msGeometry</PropertyName><gml:Point<gml:coordinates>158380,4130457</gml:coordinates></gml:Point><Distance
units='m'>10000</Distance></DWithin></Filter>

It returns the following error:

msWFSGetFeature(): WFS server error. Invalid or Unsupported FILTER in
GetFeature :
<Filter><DWithin><PropertyName>msGeometry</PropertyName><gml:Point<gml:coordinates>158380,4130457</gml:coordinates></gml:Point><Distance
units='m'>10000</Distance></DWithin></Filter>

But I don't know what could be wrong because the URL is based on the
documentation example. I don't have control of the MapServer, but I have
done a GetCapabilities request to the WFS server and it shows some warnings
in the FeatureType for the layer:

<FeatureType>
<Name>MSPF_POLY</Name>
<!--
 WARNING: Mandatory metadata '..._title' was missing in this context.
-->
<Title>MSPF_POLY</Title>
<SRS>EPSG:25830</SRS>
<LatLongBoundingBox minx="100314" miny="3.98535e+06" maxx="615158"
maxy="4.18983e+06"/>
<!--
 WARNING: Required Feature Id attribute (fid) not specified for this
feature type. Make sure you set one of wfs_featureid, ows_featureid or
gml_featureid metadata.
-->
</FeatureType>

The point coordinates are in the same EPSG that the layer and The
Filter_Capabilites seem to be OK too. So I don't know If I'm missing
something.

Thanks in advance.

Fran Acuña
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20200425/af234f23/attachment.html>


More information about the mapserver-users mailing list