Ticket #985 (closed defect: fixed)
legend output and raster data
| Reported by: | tomkralidis | Owned by: | mapserverbugs |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | WMS Server | Version: | unspecified |
| Severity: | normal | Keywords: | |
| Cc: |
Description
Currently, issuing a GetLegendGraphic request for raster layers return blank for me using latest CVS. This is also the case for MapServer CGI mode=legend (and probably MapScript). Some sort of legend icon would be useful. Suggested approaches (in logical order) 1./ Define KEYIMAGE in the CLASS object, pointing to a static image file. Request returns KEYIMAGE 2./ If the raster layer is classified in the mapfile, create legend graphic with this classification 3./ If GetLegendGraphic is called with an SLD with a RasterSymbolizer defined for the raster layer, create legend graphic with this definition 4./ Scan all cells for RGB values (or SLD ColorMap or mapfile classification) and generate a graduated image. This appears to be the CubeWerx way, i.e.: http://demo.cubewerx.com/demo/cubeserv/cubeserv.cgi?CONFIG=main&SERVIC E=WMS&VERSION=1.1.1&REQUEST=GetLegendGraphic&LAYER=GTOPO30%3AFoundation&FO RMAT=image%2Fpng&width=300&height=322 Daniel says this may be expensive in real-time, and I would tend to agree. This would be a nice feature in legend.c, which could help people create these offline, then referring to them via KEYIMAGE. 5./ If none of the above exist/occur, then return something arbitrary as the graphic (anything is better than blank), such as an "R", or "RGB", etc.
Change History
Note: See
TracTickets for help on using
tickets.
