Sunday, 18 November 2018

wfs - Geoserver CQL Cross Layer Intersection Failing


I am having trouble forming a properly formatted CQL request using geoServer cross layer filer functions and was hoping others could assist. My request is as follows:


http://localhost:8080/geoserver/wfs?request=GetFeature&typeName=AU:TownPoints&CQL_FILTER=INTERSECTS(the_geom,collectGeometries(queryCollection('AU:Districts','the_geom','CODE=A1')))&version=1.1.0

The intent is to select the towns that are within a selected District shape.


With the above request a null data set is returned:







I think the formatting of my query string 'CODE=A1' is wrong, so geoServer returns a null set for the queryCollection, meaning the intersection is being performed against a null set. (Note: CODE='A1' works fine if I query Districts directly.)


I have also tried 'CODE='A1'' and some other variations but this nesting always causes an exception similar to the following:


Could not parse CQL filter list. Encountered "A1" at line 1, column 92.
Was expecting one of:
")" ...
"," ...

"/" ...
"*" ...
"+" ...
"-" ...
Parsing : INTERSECTS(the_geom,collectGeometries(queryCollection('AU:Districts','the_geom','CODE='A1''))).

I have looked at lots of examples but cannot find one with a filter string in the queryCollection function.




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...