0

I'm trying to use CQL but I guess I do it wrong because I get pink layer in return and error in geoserver :

Binary geometry filter, but first expression is not a property name? (it's a class org.geotools.filter.LiteralExpressionImpl) java.lang.IllegalArgumentException: Binary geometry filter, but first expression is not a property name?

This is how I try to do the DWITHIN (get all lines at 200 meter from buildings)

wLayer.mergeNewParams({'CQL_FILTER': "DWITHIN('geom',querySingle('Buildings','geom','INCLUDE'),200,meters)"})

What am I doing wrong ?

0

I think you just need to remove the single quotes around geom:

wLayer.mergeNewParams(
  {
    'CQL_FILTER': "DWITHIN(geom,querySingle('Buildings','geom','INCLUDE'),200,meters)"
  }
)

I additionally suggest to first try it with a fixed point as second argument:

wLayer.mergeNewParams(
  {
    'CQL_FILTER': "DWITHIN(geom,POINT(7 15),200,meters)"
  }
)
  • The point works , but when I try queryCollection I get error that more than 1000 items are brought back and I'm sure there are much less than 1000. – Alophind Jan 25 '14 at 18:55

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.