geoserver - WFS Error : bbox and cql_filter both specified but are mutually exclusive

geoserver - WFS Error : bbox and cql_filter both specified but are mutually exclusive

我正在尝试使以下 WFS GET 请求生效:

http://domain.com:8080/geoserver/bla/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=testing&outputFormat=json&bbox=-120.67383749999999,26.667051210679244,-70.75196249999999,46.25581231694961

但是当我用 bbox 过滤器添加 cql_filter 时,我收到了这个错误:

Error:bbox and cql_filter both specified but are mutually exclusive 

http://domain.com:8080/geoserver/bla/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=testing&outputFormat=json&bbox=-120.67383749999999,26.667051210679244,-70.75196249999999,46.25581231694961&cql_filter=RENEWABLE='Biomass'

没错,WFS规范说各种shorthand过滤器KVP是互斥的,不能连用。

好消息是您可以将整个过滤器编码为单个 CQL_FILTER 表达式,请在此处查看一些文档: http://docs.geoserver.org/latest/en/user/tutorials/cql/cql_tutorial.html#geometric-filters

作为替代方案,您也可以使用 FILTER 参数并使用 XML OGC 过滤器编码来执行相同的操作。