Miles Jordan ha scritto:
> Andrea Aime wrote:
>> Andrea Aime ha scritto:
>>> I also agree that doing a full data scan every time you do a 
>>> GetLegendGraphics is probably asking for too much work on the
>>> server side (not to mention you'd have to extend the request to
>>> accept the current bbox to know what exactly you're rendering)
>> That said... if someone really wants to implement this code path in
>> a way that it is activated only when the user asks for it... why
>> not? :- )
>> 
>> It could be implementing without actually loading features (at
>> least for databases) by counting the number of features that are in
>> the bbox, satisfy the current filter and the rule filter. If > 0
>> the rule is active.
>> 
>> Cheers Andrea
>> 
> 
> Thanks for the info Andrea.
> 
> I started to do it before I realised how much extra work it would
> take the server to process. But I didn't think of doing it without
> loading features. I'll give that a shot.

Yep. Mix the filters, grab a feature collection (or the feature source)
and issue a getCount(Query) or a size() on the collection.
How efficient that is going to be, it's up to the store implementation,
e.g., shapefiles will load the features anyways just to count them
because the filters have to be evaluated in memory.
But at least they won't be rendered

Cheers
Andrea

-- 
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to