I badly want to use GET instead of POST.
I know that DWITHIN ignores distance units and in desparation, I have 
made the requests via native SRS, converting to lat/long in the client 
before the call.

The post version looks like:
<wfs:GetFeaturexmlns:wfs="http://www.opengis.net/wfs"service="WFS"version="1.1.0"xsi:schemaLocation="http://www.opengis.net/wfs
 
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
<wfs:QuerytypeName="MARINE.DSDP_ODP_VIEW"srsName="EPSG:4326">
<ogc:Filterxmlns:ogc="http://www.opengis.net/ogc";>
<ogc:DWithin>
<ogc:PropertyName>SHAPE</ogc:PropertyName>
<gml:Pointxmlns:gml="http://www.opengis.net/gml"srsName="EPSG:4326";>
<gml:pos>167.7703906253809 -40.585930579756806</gml:pos>
</gml:Point>
<ogc:Distanceunits="meters">1.8883003464941</ogc:Distance>
</ogc:DWithin>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>

and it returns 2 features as expected.

The GET version (using CQL_FILTER) looks like:
/geoserver/wfs?service=WFS&version=1.1.0&srsName=EPSG%3A4326&request=GetFeature&featurePrefix=gns&typeName=MARINE.DSDP_ODP_VIEW&outputFormat=json&cql_filter=DWITHIN(SHAPE%2CPOINT(167.6825000003944%20-40.45230364109423)%2C10.8883003464941%2Cmeters)&format_options=callback%3AOpenLayers.Protocol.Script.getCallback(1)

For clarity that is
cql_filter=DWITHIN(SHAPE, POINT(167.6825000003944 
-40.45230364109423),1.8883003464941,meters)

And this returns json with a completely empty feature set. The problem 
must be with the formatting of the CQL_FILTER as I get full set if I 
remove it.

Tried it on both geoserver 2.1 and on geoserver 2.0.2

HELP!


-- 
Phil Scadden, GNS Science Ltd 764 Cumberland St, Private Bag 1930, 
Dunedin, New Zealand Ph +64 3 4799663, fax +64 3 477 5232

Notice: This email and any attachments are confidential. If received in error 
please destroy and immediately notify us. Do not copy or disclose the contents.


------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to