Issues here.
                                        filter: new 
OpenLayers.Filter.Spatial({
                                            property: "SHAPE",
                                            type: 
OpenLayers.Filter.Spatial.DWITHIN,
                                            distance: 
map.getExtent().getHeight() / 10000000,
                                            distanceUnits: "degree",
                                            value: e.feature.geometry
                                        }),
I set up a filter on a layer,  (SDE now coming from Geoserver 2.0).
It generates a POST of

|<wfs:GetFeature xmlns: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:Query 
typeName="MYLAYER" srsName="EPSG:900913">||<ogc:Filter 
xmlns:ogc="http://www.opengis.net/ogc";><ogc:DWithin><ogc:PropertyName>the_geom</ogc:PropertyName||><gml:Point
 xmlns:gml="http://www.opengis.net/gml"; 
srsName="EPSG:900913"><gml:pos>19372200.445898 
-4657155||.2587109</gml:pos></gml:Point><ogc:Distance 
units="degree">0.46082355604312003</ogc:Distance></ogc:DWithin||></ogc:Filter></wfs:Query></wfs:GetFeature>

note the property name of "the_geom".

This gets a wfs response of:
|

|<?xml version="1.0" encoding="UTF-8"?>
||<ows:ExceptionReport version="1.0.0"
||  xsi:schemaLocation="http://www.opengis.net/ows 
http://maps.gns.cri.nz:80/geoserver/schemas/ows/1.0||.0/owsExceptionReport.xsd"
||  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:ows="http://www.opengis.net/ows";>
||  <ows:Exception exceptionCode="InvalidParameterValue">
||    <ows:ExceptionText>Illegal property name: the_geom</ows:ExceptionText>
||  </ows:Exception>
||</ows:ExceptionReport>

Quite correct - because the geometry is in SHAPE not in the_geom.

What am I doing wrong or has an incompatibility developed with geoserver?

|


-- 
Phil Scadden, Senior Scientist 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.

_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to