single classed layers and GetLegendGraphic

Kralidis,Tom [Burlington] Tom.Kralidis at EC.GC.CA
Mon Nov 8 11:03:16 EST 2004


> -----Original Message-----
> From: Yewondwossen Assefa [mailto:assefa at dmsolutions.ca] 
> Sent: Monday, 08 November, 2004 10:30
> To: Kralidis,Tom [Burlington]
> Cc: MAPSERVER-DEV at LISTS.UMN.EDU
> Subject: Re: [UMN_MAPSERVER-DEV] single classed layers and 
> GetLegendGraphic
> 
> 
> Is it possible for you to use the RULE parameter (set to the 
> class name 
> ) ? That should retun only the icon for the class.
> If not, I am not sure what the best solution is. Maybe add a 
> support to 
> a vendor specific request parameter that alaways return an 
> icon for the 
> first class. I personnaly prefer this way rather than having 
> a diffrent 
> behaviour when there is one or more than one classes. Comments ?
> 

We can use RULE=, however how would a WMS client know what the
rule/class names are?

I have received some other responses which favour this approach because
one can get a 'full' legend without the need to print out text, as it's
handled in the output graphic.  This makes sense in this context.

As a result, what do people think about:

- making GetLegendGraphic always return icon ONLY for single-class
layers, full for multiple classes (as per now)
- adding in VendorSpecificCapabilities called "GetLegend" which would
return a 'full' legend, titles and all for multiple layers, so someone
can get a single legend icon for multiple WMS layers from the same WMS?
We could also extend so that such a request can also ingest a Web Map
Context Document and output a single legend graphic.

Comments?

..Tom






> Later,
> 
> Kralidis,Tom [Burlington] wrote:
> > Hi,
> > 
> > (Using latest CVS).
> > 
> > Many of our layers have one class object defined, with CLASS->NAME 
> > defined as well.
> > 
> > When doing an OGC:WMS GetLegendGraphic request on a layer with a 
> > single CLASS, the legend graphic is returned with the icon 
> alongside 
> > the
> > CLASS->NAME value as embedded text, i.e.
> > 
> > 
> http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?version=1.1.1&service=WMS&
> > re
> > quest=GetLegendGraphic&layer=hydroshedg&format=image/gif
> > 
> > CLASS decl:
> > 
> >   CLASS
> >    NAME "Watershed Polygons, Ontario"
> >    SYMBOL 0
> >    COLOR -1 -1 -1
> >    OUTLINECOLOR 0 0 200
> >   END
> > 
> > For those layers with multiple CLASS objects defined, I think this 
> > makes sense.  For layers with one CLASS defined, the behaviour I've 
> > seen most is that only the icon is returned, and no text (the text 
> > would presumably come from the layer title one would get from 
> > Capabilities.
> > 
> > I've tried commenting out the NAME declaration, but that 
> gives me back 
> > a blank image.  When I try:
> > 
> > NAME ""
> > 
> > ..this works.
> > 
> > I've sent this to mapserver-dev because I think this was worked on 
> > sometime in the last few weeks when upgrading GetLegendGraphic for 
> > multiple CLASSes.
> > 
> > Thanks
> > 
> > ..Tom
> > 
> > 
> 
> 
> -- 
> ----------------------------------------------------------------
> Assefa Yewondwossen
> Software Analyst
> 
> Email: assefa at dmsolutions.ca
> http://www.dmsolutions.ca/
> 
> Phone: (613) 565-5056 (ext 14)
> Fax:   (613) 565-0925
> ----------------------------------------------------------------
> 
> 
> 



More information about the mapserver-dev mailing list