[OpenLayers-Users] Problem with the &bbox param when using Filer in a Wfs request to geoserver

marc bordessoule marc.bordessoule at gmail.com
Thu Aug 23 17:24:46 EDT 2007


hi,
I am trying to use Filter in a WFS request to a geoserver service :
...
//------------- WFS layer --------------------------------
rlayer = new OpenLayers.Layer.WFS(
    "road",
    "http://127.0.0.1:8080/geoserver/wfs",
    {
    typename: 'sf:roads' ,
    filter:
'<Filter><PropertyIsEqualTo><PropertyName>cat</PropertyName><Literal>5</Literal></PropertyIsEqualTo></Filter>'
    }
);
map.addLayer(rlayer);
...

the wfs request generated by OL to geoserver is :

http://127.0.0.1:8080/geoserver/wfs?typename=sf%3Aroads&filter=%3CFilter%3E%3CPropertyIsEqualTo%3E%3CPropertyName%3Ecat%3C%2FPropertyName%3E%3CLiteral%3E5%3C%2FLiteral%3E%3C%2FPropertyIsEqualTo%3E%3C%2FFilter%3E&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&SRS=EPSG%3A26713&BBOX=578818.421053%2C4910169%2C617777.578947%2C4933301

(with some cleaning :
http://127.0.0.1:8080/geoserver/wfs?typename=sf:roads
&filter=<Filter><PropertyIsEqualTo><PropertyName>cat</PropertyName><Literal>5</Literal></PropertyIsEqualTo></Filter>
&SERVICE=WFS
&VERSION=1.0.0
&REQUEST=GetFeature
&SRS=EPSG:26713
&BBOX=578818.421053,4910169,617777.578947,4933301
)

But geoserver answers me that i can use two filters at the same time in the
request : &Filter and &BBOX

<ServiceExceptionReport version="1.2.0" xsi:schemaLocation="
http://www.opengis.net/ogc
http://127.0.0.1:8080/geoserver/schemas//wfs/1.0.0/OGC-exception.xsd">
 <ServiceException>
      GetFeature KVP request contained conflicting filters.
    Filter:
<Filter><PropertyIsEqualTo><PropertyName>cat</PropertyName><Literal>5</Literal></PropertyIsEqualTo></Filter>,

    fid: null,
    bbox:578818.421053,4910169,617777.578947,4933301
 </ServiceException>
</ServiceExceptionReport>


in fact, i want to avoid the &bbox a the end of the wfs resquest send by OL
to geoserver.

When i take the request and i remove the &bbox param the answer is correct.


Perhaps someone can help me?


I am using :
OpenLayers version : 2.4
geoserver version : 1.5.2


Many thanks,
Marc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20070823/933ed01e/attachment.html


More information about the Users mailing list