Hi,
among the current pull requests we have this one about having legends URL in capabilities
documents use a pre-cooked image.
The idea is pretty useful, sometimes GeoServer cannot generate a good legend for a layer,
and hand painted once often look better regardless.
The implementation pretty much gives UI to a LegendInfo object that we have in the model,
and which has been sitting doing nothing for ages (afaik).
The style page has a new element to add a legend:
What is giving me pause is what you get when you click on “add legend”:
So, basically one has to specify a remote url that will generate the legend image.
Now, this is no GUI’s fault per se, the LegendInfo object has those exact fields, and the code
in the GetCapabilities generators use LegendInfo url/width/height/format to build the
proper links.
However… it seems to be it’s quite against the general GeoServer philosophy to ask someone
to stand up a separate server to use pre-rendered legends… I was kind of expecting to get a file upload
tool that would have allowed the user to upload the legend image instead.
The other thing to take into account is that Mauro recently added support for multi-layer legends,
used by default for layer groups, but allowing also one to specify more than one layer in the
GetLegendGraphics request.
Now, with the pre-cooked legend, the code should go and fetch the pre-cooked legend and add it
to the multi-layer legend layout. And this presents issues, there is no guarantee that GeoServer
itself can reach to the specified URL.
For example, on my ADSL I would have to provide my internet domain address for anybody to
be able to reach the GetLegendGraphics URL, but from within the router, the same domain
cannot be reached…
Opinions?
Cheers
Andrea
–
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it 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