Thanks Jim and Andrea
1. first solution sounds a bit overwhelming. Running the first phase and 
getting result feature from server, then converting that geometry to WKT in 
client-side and putting it to another filter and sending to server to get the 
final result. Am i in the right way?2. Thanks for pointing this plugin. I was 
aware of this plugin but it didn't came into my mind that in this plugin i can 
set layer B = layer A (All my data is in one layer). I'm gonna give it a try.3. 
Thanks again for this solution. Although, i'm currently using shapefiles, but 
knowing this feature of GeoServer will be useful for the future.4. Around 4th 
solution, i'm not sure i can handle it. I'm not that professional and waiting 
for future mature releases of this feature maybe the right choice for me.
Regards


      From: Jim Hughes <[email protected]>
 To: [email protected] 
 Sent: Sunday, August 7, 2016 6:58 PM
 Subject: Re: [Geoserver-users] Combining comparison and spatial predicates in 
CQL
   
 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


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

Reply via email to