我有一个如下的查询
http://localhost:8080/geoserver/wfs/?service=wfs&version=1.1.0&outputFormat=json&request=getfeature&typename=tiger:poly_landmarks,tiger:poi&cql_filter=INTERSECTS(the_geom, querySingle('tiger:poly_landmarks', 'the_geom','LAND=83','CFCC=H11'))
这提供了3个功能
{
"type": "FeatureCollection"
"totalFeatures": 3
"features": [3]
0: {
"type": "Feature"
"id": "poly_landmarks.3"
...More
但是,如果我再添加一个过滤器到query.single ' LANAME = East River' ,如下所示
http://localhost:8080/geoserver/wfs/?service=wfs&version=1.1.0&outputFormat=json&request=getfeature&typename=tiger:poly_landmarks,tiger:poi&cql_filter=INTERSECTS(the_geom, querySingle('tiger:poly_landmarks', 'the_geom','LAND=83','CFCC=H11','LANAME=East River'))
提出错误
<ows:ExceptionReport version="1.0.0" xsi:schemaLocation="http://www.opengis.net/ows http://localhost:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd">
<ows:Exception exceptionCode="NoApplicableCode">
<ows:ExceptionText>Could not parse CQL filter list. Function not found. Parsing : INTERSECTS(the_geom, querySingle('tiger:poly_landmarks', 'the_geom','LAND=83','CFCC=H11','LANAME=East River')).</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
答案 0 :(得分:1)
对于documentation,似乎querySingle只接受3个参数,所以你的方式不起作用。我怀疑(即我没有在此上下文中对此进行测试)您可以使用AND
构建更复杂的CQL filter。所以我会尝试
querySingle('tiger:poly_landmarks', 'the_geom','LAND=83 AND CFCC=H11 AND LANAME=East River'))