I thought I answered this one several months ago but I can’t find the answer 
anywhere so it was probably in my dreams :-)

We tried the cross layer filtering, but that was definitely not an improvement. 
It was in fact even (much) slower than with the CQL_FILTER alternative. And 
because we currently have some strict deadlines introducing a new framework 
and/or application (like MapProxy or GeoFence) is not really an option.

We use a database (MS SQL Server 2008 R2) as data source for all the layers. In 
the first version of our application we used views, but we replaced them with 
tables because it improved the performance significantly. I don’t think views 
offer a solution in this case, because the geographic area can be different for 
every user. So we either need a view on the database for every possible 
geographic area (which is of course not really scalable) or else use the SQL 
views feature of geoserver and define for every layer also a sql view. I don’t 
like the idea of having to duplicate all layers (approximately 40) for this 
purpose. And based on our previous experiences with views, I wonder if the 
performance will improve.

So currently we have decided to stick to our initial approach of adding a 
CQL_FILTER parameter to the request. And try to improve the performance of 
these requests. Not sure how this can be achieved, but it’s currently being 
discussed in this topic 
http://osgeo-org.1560.x6.nabble.com/GetMap-request-with-CQL-FILTER-too-slow-td5226626.html

Kind regards,
Roel De Nijs
Senior Java Developer


Van: Martin Davis [mailto:mtncl...@gmail.com]
Verzonden: dinsdag 10 februari 2015 19:08
Aan: Roel De Nijs <roel.den...@aquafin.be>
CC: geoserver-users@lists.sourceforge.net
Onderwerp: Re: [Geoserver-users] Limiting GetMap request using a Geometry

What is the data source for the layers?  Is it a database?  If so, would SQL 
Views offer a solution?

On Tue, Feb 10, 2015 at 4:29 AM, Roel De Nijs 
<roel.den...@aquafin.be<mailto:roel.den...@aquafin.be>> wrote:
Hi list,

We send a WMS GetMap-request (through OpenLayers) to geoserver for a set of 
layers. The number of comma-seperated values in the layers parameter ranges 
from 1 to 30.

Some of our users are only allowed to see the objects of a certain geographic 
area like a city or a state. To implement this requirement, we currently add a 
cql_filter to the request and so for each layer (in the layers parameter) we 
add something like “WITHIN(the_geom, wktOfArea)”. This wktOfArea can get quite 
big and is thus repeated for every layer (resulting in a very big request). It 
works, but it’s slow.

Are there any alternatives to implement this requirement? What’s considered tob 
e the best approach? I noticed the querylayer module (cross layer filtering) 
and because the cities and states are defined in a seperate geoserver layer, I 
assume this could be a (good) alternative...



________________________________

Volg Aquafin op Facebook<https://www.facebook.com/AquafinNV> | 
Twitter<https://twitter.com/aquafinnv> | 
YouTube<http://www.youtube.com/channel/UCk_4P5BJ-MtEEDCkCsR_KqQ?feature=mhee> | 
LinkedIN<http://www.linkedin.com/company/aquafin/products>

Disclaimer: zie www.aquafin.be<http://www.aquafin.be>   P Denk aan het milieu. 
Druk deze mail niet onnodig af.

------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to