Hi Saka,

It sounds like you want to select a list of features and then find additional features within a small distance of the first features? CQL by itself (with no functions) is not powerful enough to express that in one go. I think of CQL as the 'where' clause for a single SQL statement with no joins.

Given all that, there are two, maybe three options: 1. Handle the two phases of querying yourself in client code (as you suggested) or 2. Use the GeoServer Cross-Layer filtering plugin(1). 3. If all your queries look mostly the same, you might be able to get away with a SQL View assuming you are using a traditional database like PostGIS.

The benefit (and downside) of #1 is that you'll have complete control over the process. If I were doing this, I'd probably start with #2. The biggest gotchas there are with memory management.

Hope that help!

Jim

1. http://docs.geoserver.org/stable/en/user/extensions/querylayer/index.html
2. http://docs.geoserver.org/stable/en/user/data/database/sqlview.html

On 8/7/2016 3:45 AM, Saka Royban wrote:
Hi all.
I've searched google a lot for a question that sounds common to me but i didn't found even a page.

How to combine comparison (attribute-based) predicates and spatial (topological) predicates in a filter in CQL (though, i think there would be no difference between CQL and filter encoding and solution for one can be converted to other)? I'm aware of logical operators but that doesn't satisfy my need. For example, finding a feature which its name = 'someName' and then finding adjacent features to this feature. Is it possible to combine these two filter expression, at all? or it needs more javascript programming than writing a simple filter string?

Regards



------------------------------------------------------------------------------


_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users


------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to