[Geoserver-users] [Mapbuilder-users] legend graphics, sld rules, etc.

Vincent,

I agree, probably best to open up Geoserver JIRA issues for the following:

1) GetLegendGraphic without a Rule specified in the request on a point layer
only displays 1 Rule

2) width and height in the GetLegendGraphic request should be interpreted as
the width and the height of the keyimage (not of the total image).

3) add support for GetStyles request

4) when no Rule is specified in the GetLegendGraphic request, add labels to
the legend keys (using Rule->Title, and if not present since optional then
use Rule->Name instead)

Best regards,
Bart

--
Bart van den Eijnden
OSGIS, Open Source GIS
http://www.osgis.nl

--------- Oorspronkelijk bericht --------
Van: Vincent Schut <schut@anonymised.com>
Naar: geoserver users <geoserver-users@lists.sourceforge.net>
Cc: mapbuilder-users <mapbuilder-users@lists.sourceforge.net>
Onderwerp: Re: [Geoserver-users] [Mapbuilder-users] legend graphics, sld
rules, etc.
Datum: 29/11/06 08:58

[still cc-ing to mb user list, though the discussion is becoming more
geoserver-centric, but mb people might still be interested?]

- About the getLegendGraphic for all rules of one layer:

For line and polygon layers this works, but for point layers geoserver
just gives me one icon. See the attached sld, which defines 2 rules, one
for larger cities and 1 for other cities. Geoserver just gives me one
graphic back with a getLegendGraphic request on a point layer with this
style. The layer renders OK though, with both symbols appearing in the
image.
Can someone test this and confirm?

Furthermore, shouldn't geoserver multiply the HEIGHT parameter with the
number of rules rendered in the legendGraphic, so the height (and width)
apply to a single sld rule icon, instead of to the entire rendering
result? Because there is no way to beforehand know the number of rules
(from a client point of view), one cannot specify the correct height in
the request. However, even when not specifying any height, all rules are
being rendered inside one 20x20 pixel graphic, giving some strange
results when one has many rules.

- About also rendering the rule titles:

I'd like to see geoserver do that, as there currently is no way to get
at the rule names because geoserver does not (afaik) support the WMS
getStyle request, so there is no way to put the right names beside your
legend class icons.

Cheers,
Vincent.

Bart van den Eijnden (OSGIS) wrote:
&gt; Vincent,
&gt;
&gt; last time I checked GetLegendGraphic with Geoserver (around the
&gt; Lausanne conference, sept 2006), everything was fine and it displayed

&gt; an image representative of all the rules. Only problem I found is

that

&gt; the image misses the labels (Rule Titles or Names).
&gt;
&gt; See also (slide 26):
&gt;
&gt;

http://www.foss4g2006.org/materialDisplay.py?contribId=16&amp;amp;sessionId=37&amp;amp;materialId=slides&amp;amp;confId=1

&gt;
&gt;
&gt; Wrt your second question, the SLD WMS spec has a GetStyles request
&gt; which returns an SLD document describing all the rules in a style.
&gt;
&gt; Best regards,
&gt; Bart
&gt;
&gt; Vincent Schut schreef:
&gt;&gt; Hi lists,
&gt;&gt;
&gt;&gt; I'm on a quest to get good looking legends in my mapbuilder

based,

&gt;&gt; geoserver backed webgis client. The problem is the following:
&gt;&gt;
&gt;&gt; most of my layers have more than one class. This is expressed by

more

&gt;&gt; than one rules in the SLD for that layer. I want all used classes

for

&gt;&gt; my layers show up in my legend. I see 2 ways to solve this:

having

&gt;&gt; geoserver create a graphic for all rules of that layer, or

looping

&gt;&gt; the rules in mapbuilder and requesting one icon per rule.
&gt;&gt;
&gt;&gt; However:
&gt;&gt;
&gt;&gt; - when doing a getLegendGraphic request at geoserver and omitting

any

&gt;&gt; rules, I only get the icon for the first rule back. I thought the

&gt;&gt; spec said that in this case, the WMS service should return a

graphic

&gt;&gt; that is representative for all rules of that layer? What did I do

wrong?

&gt;&gt;
&gt;&gt; - I can't find a way to get the current rules for the current

style

&gt;&gt; of a layer in mapbuilder (e.g. by some request to geoserver and
&gt;&gt; parsing some xml). I tried to find it in the OGC documentation,

but

&gt;&gt; did not find anything (but I might have overlooked it, as to my
&gt;&gt; experience this documentation was pretty maze-like...) Anyone

knows a

&gt;&gt; way to get the rules of the current style of a layer from

geoserver?

&gt;&gt;
&gt;&gt; Cheers,
&gt;&gt; Vincent.
&gt;&gt;
&gt;&gt; btw both geoserver (and geotools) and mapbuilder are pretty

recent

&gt;&gt; versions from svn, at most one week old.
&gt;&gt;
&gt;&gt;

-------------------------------------------------------------------------

&gt;&gt;
&gt;&gt; Take Surveys. Earn Cash. Influence the Future of IT
&gt;&gt; Join SourceForge.net's Techsay panel and you'll get the chance to

&gt;&gt; share your
&gt;&gt; opinions on IT &amp; business topics through brief surveys - and

earn cash

&gt;&gt;

http://www.techsay.com/default.php?page=join.php&amp;p=sourceforge&amp;CID=DEVDEV

&gt;&gt;
&gt;&gt; _______________________________________________
&gt;&gt; Mapbuilder-users mailing list
&gt;&gt; Mapbuilder-users@lists.sourceforge.net
&gt;&gt; https://lists.sourceforge.net/lists/listinfo/mapbuilder-users
&gt;&gt;
&gt;&gt;
&gt;&gt;
&gt;
&gt;

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share

your

opinions on IT &amp; business topics through brief surveys - and earn cash

http://www.techsay.com/default.php?page=join.php&amp;p=sourceforge&amp;CID=DEVDEV

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