Miles Jordan ha scritto:
> Moving this to the dev list.
> 
> It seems to me that in order for a Filter to be passed to
> GetLegendGraphic instead of a Rule name, I'd have to render the
> entire layer internally first with the Filter applied, then check
> which Rules are valid and create the legend graphic based on that.
> Seems like a bit too much overhead just to create a single legend
> graphic. Perhaps there is a better way.
> 
> Interested to hear if anyone has any ideas (or just confirm if my
> assumption is correct)>

I think your assumption is correct. Doing that without actually
hitting the data would require doing some symbolic comparison
between the filters, which would rapidly become impossible to
judge statically as complex filters come into the picture.

E.g. if a rule says "ATT > 10" and the filter says "ATT > 5"
you can understand that the filter will activate
that rule by writing a symbolic expression comparator, but
what if the rule says "ATT LIKE 'M%'" and the filter is
"ATT LIKE '%ABC%'"? There is no way to tell if the rule
will be hit by the filter without going through all the
data (same goes if the rule and the filter use different
attributes).

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)

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