<div dir="ltr">Hi Fran,<div>simple XML error in your filter:</div><div><br></div><div><gml:Point<gml:coordinates><br></div><div><br></div><div>should be:</div><div><br></div><div><gml:Point><gml:coordinates><br></div><div><br></div><div>This one returns values:</div><div><br></div><div><a href="http://www.juntadeandalucia.es/medioambiente/mapwms/REDIAM_PPHH_2012/wfs?&VERSION=1.0.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=MSPF_POLY&Filter=%3CFilter%3E%3CDWithin%3E%3CPropertyName%3EmsGeometry%3C/PropertyName%3E%3Cgml:Point%3E%3Cgml:coordinates%3E158380,4130457%3C/gml:coordinates%3E%3C/gml:Point%3E%3CDistance%20units=%27m%27%3E10000%3C/Distance%3E%3C/DWithin%3E%3C/Filter%3E">http://www.juntadeandalucia.es/medioambiente/mapwms/REDIAM_PPHH_2012/wfs?&VERSION=1.0.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=MSPF_POLY&Filter=%3CFilter%3E%3CDWithin%3E%3CPropertyName%3EmsGeometry%3C/PropertyName%3E%3Cgml:Point%3E%3Cgml:coordinates%3E158380,4130457%3C/gml:coordinates%3E%3C/gml:Point%3E%3CDistance%20units=%27m%27%3E10000%3C/Distance%3E%3C/DWithin%3E%3C/Filter%3E</a><br></div><div><br></div><div>Hope this helps</div><div><br></div><div>Cheers</div><div>Andrea</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Apr 25, 2020 at 9:55 PM Fran Acuña Parra <<a href="mailto:fran.ap89@gmail.com">fran.ap89@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi everyone,<div><br></div><div>I'm new to this list and MapServer and would like some help with an issue that I'm facing with MapServer.</div><div><br></div><div><span style="color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:14px">I'm using the following request in order to get the closest feature from a layer given some specific coordinates:</span><br></div><div><span style="color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:14px"><br></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:11.9px;background-color:rgba(27,31,35,0.05)"><a href="http://www.juntadeandalucia.es/medioambiente/mapwms/REDIAM_PPHH_2012/wfs?&VERSION=1.0.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=MSPF_POLY&Filter=" target="_blank">http://www.juntadeandalucia.es/medioambiente/mapwms/REDIAM_PPHH_2012/wfs?&VERSION=1.0.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=MSPF_POLY&Filter=</a><Filter><DWithin><PropertyName>msGeometry</PropertyName><gml:Point<gml:coordinates>158380,4130457</gml:coordinates></gml:Point><Distance units='m'>10000</Distance></DWithin></Filter></span><span style="color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:14px"><br></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:11.9px;background-color:rgba(27,31,35,0.05)"><br></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:11.9px;background-color:rgba(27,31,35,0.05)">It returns the following error:</span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:11.9px;background-color:rgba(27,31,35,0.05)"><br></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:11.9px;background-color:rgba(27,31,35,0.05)">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></span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:11.9px;background-color:rgba(27,31,35,0.05)"><br></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:11.9px;background-color:rgba(27,31,35,0.05)"><br></span></div><div><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:14px">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:</p><pre style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:11.9px;margin-top:0px;margin-bottom:16px;padding:16px;overflow:auto;line-height:1.45;background-color:rgb(246,248,250);border-radius:3px;color:rgb(36,41,46)"><code style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:11.9px;padding:0px;margin:0px;background:initial;border-radius:3px;word-break:normal;border:0px;display:inline;overflow:visible;line-height:inherit"><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></code></pre></div><div><span style="color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:14px">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.</span><br></div><div><span style="color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:14px"><br></span></div><div><span style="color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:14px">Thanks in advance.</span></div><div><span style="color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:14px"><br></span></div><div><span style="color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:14px">Fran Acuña</span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:11.9px;background-color:rgba(27,31,35,0.05)"><br></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:11.9px;background-color:rgba(27,31,35,0.05)"><br></span></div></div>
_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><span><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><font face="Arial"><span style="white-space:pre-wrap">Regards,
Andrea Aime</span></font></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><font face="Arial"><span style="white-space:pre-wrap">
==
GeoServer Professional Services from the experts! Visit <a href="http://goo.gl/it488V" target="_blank">http://goo.gl/it488V</a> for more information.
==

Ing. Andrea Aime 
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39  339 8844549

<a href="http://www.geo-solutions.it" target="_blank">http://www.geo-solutions.it</a>
<a href="http://twitter.com/geosolutions_it" target="_blank">http://twitter.com/geosolutions_it</a>


-------------------------------------------------------

<i>Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.</i><span style="font-size:14.6667px">
</span></span></font></p></span></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>