On Fri, May 30, 2014 at 11:26 PM, Jody Garnett <[email protected]>
wrote:

> I like storing the style infos, and the approach works well when setting
> up with an image (rather than get legend graphics call).
>
> Can I suggest a scary alternative, what about generating and storing the
> image on disk. The image has a width and height after all, and you could
> refer to it farther that get legend graphics?
>
> Since you have to paint the thing anyways is it worth keeping the image?
>

Hum... I was about to say "but reading a PNG is expensive", however... we
have PNGJ now in the classpath,
and with that, I can just read the header without having to decompress the
entire image as I'd have to do
with ImageIO. It would still be a file open for each style/layer
combination in the capabilities document though.

Given that clients might also want to follow the link and get the legend
graphics, this could
be coupled with a dispatcher callback that intercepts the legend graphic
request and if it
matches the one used to generate the PNG file, we could just shortcut and
return the file on disk,
getting some caching benefit

We'd still need the "last updated" information in the style files, which
could become something
standard, or maybe could be done by attaching a style specific listener to
the catalog

Cheers
Andrea

-- 
==
Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
for more information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39  339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to