[mapserver-dev] Unsupported Filter

Even Rouault even.rouault at spatialys.com
Thu Oct 30 11:06:27 PDT 2014


Le jeudi 30 octobre 2014 18:55:03, Farwell, Michael D - Exelis a écrit :
> Rahkonen,
> 
> Thanks for an actual working query.
> 
> Turns out it was the style of the coordinates.
> 
> <gml:coord><gml:X>-59.0</gml:X><gml:Y>-35.0</gml:Y></gml:coord><gml:coord><
> gml:X>-58.0</gml:X><gml:Y>-34.0</gml:Y></gml:coord> Vs.
> <gml:coordinates cs="," decimal="." ts=" ">-59,-35
> -58,-34</gml:coordinates>
> 
> Unfortunately, GeoTools formulates the request as X,Y.  There may be a way
> to override this behavior.

Mike,

Digging a bit, I see that I added this test case during the development of WFS 
2.0. I don't remember if I fixed something in that area, or if it was 
introduced before, but anyway this should be supported now with the 7.0dev 
version :

# Verify BBOX Result with <Box><coord><X> </X><Y> </Y></coord><coord><X> 
</X><Y> </Y></coord></Box>
# RUN_PARMS: wfs_filter_bbox_old_fashion.xml [MAPSERV] 
QUERY_STRING="map=[MAPFILE]&SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=popplace&FILTER=<Filter><BBOX><PropertyName>POINT</PropertyName><Box+srsName=%22urn:ogc:def:crs:EPSG:26920%22><coord><X>272868.16</X><Y>4938053.09</Y></coord><coord><X>281261.3</X><Y>4951109.39</Y></coord></Box></BBOX></Filter>" 
> [RESULT]

Did you check if there was a way to make GeoTools use WFS 1.1 style BBOX ? 
Should be better supported that this anciant way of expressing GML box.

Even

> 
> Thanks for your help.
> 
> Mike
> 
> 
> From: Rahkonen Jukka (Tike) [mailto:jukka.rahkonen at mmmtike.fi]
> Sent: Thursday, October 30, 2014 12:20 PM
> To: Farwell, Michael D - Exelis; 'Lime, Steve D (MNIT)';
> 'mapserver-dev at lists.osgeo.org' Subject: Re: Unsupported Filter
> 
> Hi,
> 
> I did not study why it does not work but here is a complete GetFeature POST
> with BBOX filter that works. Compare with yours and report what makes the
> difference.
> 
> POST http://demo.mapserver.org/cgi-bin/wfs HTTP/1.1
> Content-Type: text/xml
> User-Agent: Jakarta Commons-HttpClient/3.0-beta1
> Host: demo.mapserver.org
> Proxy-Connection: Keep-Alive
> Content-Length: 835
> 
> <wfs:GetFeature service="WFS" version="1.0.0"
> xmlns:wfs="http://www.opengis.net/wfs"
> xmlns:ogc="http://www.opengis.net/ogc"
> xmlns:gml="http://www.opengis.net/gml"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://www.opengis.net/wfs
> http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd<http://www.opengis.net/
> wfs%20http:/schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd>"
> maxFeatures="1000" outputFormat="GML2"><wfs:Query
> typeName="cities"><ogc:PropertyName>NAME</ogc:PropertyName><ogc:PropertyNa
> me>POPULATION</ogc:PropertyName><ogc:PropertyName>msGeometry</ogc:PropertyN
> ame><ogc:Filter><ogc:BBOX><ogc:PropertyName>msGeometry</ogc:PropertyName><g
> ml:Box xmlns:gml="http://www.opengis.net/gml"><gml:coordinates cs=","
> decimal="." ts=" ">-56.020765027322405,-4.650424681845783
> -36.836187006678806,25.4390713715847</gml:coordinates></gml:Box></ogc:BBOX
> ></ogc:Filter></wfs:Query></wfs:GetFeature>
> 
> 
> -Jukka Rahkonen-
> 
> 
> Lähettäjä:
> mapserver-dev-bounces at lists.osgeo.org<mailto:mapserver-dev-bounces at lists.o
> sgeo.org> [mailto:mapserver-dev-bounces at lists.osgeo.org] Puolesta Farwell,
> Michael D - Exelis Lähetetty: 30. lokakuuta 2014 17:42
> Vastaanottaja: Lime, Steve D (MNIT);
> mapserver-dev at lists.osgeo.org<mailto:mapserver-dev at lists.osgeo.org> Aihe:
> Re: [mapserver-dev] Unsupported Filter
> 
> Steve,
> 
> Thanks for the reply.
> 
> I'm having the same issue with an internal 6.x mapserver, so I tried the
> demo server.  Are you aware of other publicly available mapservers that
> could be used for minimal testing.
> 
> Mike
> 
> From: Lime, Steve D (MNIT) [mailto:Steve.Lime at state.mn.us]
> Sent: Thursday, October 30, 2014 11:38 AM
> To: Farwell, Michael D - Exelis;
> mapserver-dev at lists.osgeo.org<mailto:mapserver-dev at lists.osgeo.org>
> Subject: RE: Unsupported Filter
> 
> That's a 5.6.5 server. I wonder if newer versions have the same limitation.
> 
> From:
> mapserver-dev-bounces at lists.osgeo.org<mailto:mapserver-dev-bounces at lists.o
> sgeo.org> [mailto:mapserver-dev-bounces at lists.osgeo.org] On Behalf Of
> Farwell, Michael D - Exelis Sent: Thursday, October 30, 2014 10:23 AM
> To: mapserver-dev at lists.osgeo.org<mailto:mapserver-dev at lists.osgeo.org>
> Subject: [mapserver-dev] Unsupported Filter
> 
> Mapserver dev,
> 
> Does anyone know why the UMN demo map server does not support the following
> WFS 1.0.0 post request?:
> 
> curl -X POST
> 'http://demo.mapserver.org/cgi-bin/wfs?REQUEST=GetFeature&VERSION=1.0.0&SE
> RVICE=WFS' -d @/tmp/post.xml -H 'Content-Type: application/xml' -k
> 
> Where /tmp/post.xml contains:
> 
> <?xml version="1.0" encoding="UTF-8"?><wfs:GetFeature
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:ms="http://mapserver.gis.umn.edu/mapserver"
> xmlns:ogc="http://www.opengis.net/ogc"
> xmlns:wfs="http://www.opengis.net/wfs"
> xmlns:gml="http://www.opengis.net/gml" handle="GeoTools
> 13-SNAPSHOT(f758d2e99d6008f6a27438946de5ef914960f605) WFS 1.0.0 DataStore
> @localhost.localdomain#1" maxFeatures="10" outputFormat="GML2"
> service="WFS" version="1.0.0"> <wfs:Query typeName="ms:cities">
>   <ogc:PropertyName>POPULATION</ogc:PropertyName>
>   <ogc:Filter>
>    <ogc:BBOX>
>     <ogc:PropertyName>msGeometry</ogc:PropertyName>
>     <gml:Box srsName="urn:x-ogc:def:crs:EPSG:4326">
>      <gml:coord>
>       <gml:X>-59.0</gml:X>
>       <gml:Y>-35.0</gml:Y>
>      </gml:coord>
>      <gml:coord>
>       <gml:X>-58.0</gml:X>
>       <gml:Y>-34.0</gml:Y>
>      </gml:coord>
>     </gml:Box>
>    </ogc:BBOX>
>   </ogc:Filter>
> </wfs:Query>
> </wfs:GetFeature>
> 
> I'm getting the following message:
> 
> WFSGetFeature(): WFS server error. Invalid or Unsupported FILTER in
> GetFeature
> 
> Thanks,
> 
> Mike
> 
> ________________________________
> 
> This e-mail and any files transmitted with it may be proprietary and are
> intended solely for the use of the individual or entity to whom they are
> addressed. If you have received this e-mail in error please notify the
> sender. Please note that any views or opinions presented in this e-mail
> are solely those of the author and do not necessarily represent those of
> Exelis Inc. The recipient should check this e-mail and any attachments for
> the presence of viruses. Exelis Inc. accepts no liability for any damage
> caused by any virus transmitted by this e-mail.

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the mapserver-dev mailing list