2016-03-03 51 views
0

我有一個查詢像下面跨層濾波擴展與更多然後2濾波器查詢不工作

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 

但是,如果我多一個過濾器添加到querySingle 'LANAME =東河'如下

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')) 

給出ERR或者說

<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> 

回答

1

對於documentation似乎querySingle只需要3個參數,以便你的方式是行不通的。我懷疑(即我沒有在這方面測試過),你可以使用AND來構建更復雜的CQL filter。所以我想嘗試

querySingle('tiger:poly_landmarks', 'the_geom','LAND=83 AND CFCC=H11 AND LANAME=East River')) 
+1

由於@iant其工作我做到了這樣的'code'http://本地主機:8080 /的GeoServer/WFS /服務= WFS&版本= 1.1.0&OUTPUTFORMAT = JSON和要求= getfeature&類型名稱=老虎? poly_landmarks,tiger:poi&cql_filter = INTERSECTS(the_geom,querySingle('tiger:poly_landmarks','the_geom','LAND =''83''和CFCC =''H11''AND LANAME =''East River''')) 'code' – chiranjeevigk