0

I am attempting to add a CQL filter to a WFS layer served from GeoServer. The result should display the pipelines which intersect landuse classes but for some reason I cannot get it to work. When using the preview in GeoServer the CQL filter works correctly.

I am storing the filter as a variable as such:

sewer_pipe_intersection_filter = ('Intersects' + '(' + 'geom' + ',' + 'collectGeometries' + '(' + 'queryCollection' + '(' + '"landuse_classifications"' + ',' + '"geom"' + ',' + '"INCLUDE"' + ')' + ')' + ')');

Am I missing something?

  • 2
    I would advise you to check the CQL in the outgoing request in your browser's dev-tools and compare it with the succesfully tested string from the GeoServer preview. Maybe the strings are not the same. – bennos Jan 19 '18 at 11:23
  • please add the xml being sent to GeoServer to the question – Ian Turton Jan 19 '18 at 11:39
  • Or, if not XML, the URL you're making the request to (in case of a GET request) – Andrea Aime Jan 20 '18 at 16:46
0

Thanks all for the help, checking the returned string helped me fix the error. Using this worked:

sewer_pipe_intersection_filter = 'INTERSECTS(geom,querySingle(' + "'Inyaninga_Live_Webmap:landuse_classifications'" + ',' + "'geom'" + ',' + "'land_use = '" + "'High Density Res''" + " '))";`

However the returned intersection has errors when compared to the result within the database, unsure what would be causing this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.