[Mapserver-users] raster legend

Dean Gadoury gadoury at dmsolutions.ca
Fri May 30 16:43:27 EDT 2003


It sounds to me that Matt is more concerned with the legend itself and 
not generating the classes in the map file. Am I correct? If so, Matt, 
you *might* find the following useful.
http://mapserver.gis.umn.edu/doc36/html-legend-howto.html
HTML legends are meant to offer the flexibility to customize legends, 
although I don't have any experience with them. If you get something up 
and running I'd appreciate knowing how it went.
Dean

Frank Warmerdam wrote:

> Matt Doggett wrote:
>
>> Has anyone successfully rendered a legend for the classes in a raster
>> layer?
>>
>>  As an example, I have a GRASS raster that contains a small number of
>> cell values (e.g. 0=none, 1=few, 2=many, 3=much, etc.) rendered from
>> GDAL and it displays in colors from red to green. But for the legend
>> icon there is just a blank white box. What I'd like is a colored box for
>> each category in the raster.
>
>
> Matt,
>
> I think you will need to define a CLASS by hand for each value you 
> want to
> appear in the legend.  Were you hoping it would be automatically 
> initialized
> from the color table (and perhaps class names?) available in GRASS?  I 
> could
> in theory implement a kind of "AUTO" class generation for raster 
> sources that
> have color tables *and* class names but that doesn't exist at this time.
>
> Best regards,


-- 
___________________________

Dean Gadoury

DM Solutions Group
72 Chamberlain Ave. Third Floor
Ottawa, Ontario. K1S 1V9
613 565-5056 ext. 24

gadoury at dmsolutions.ca
www.dmsolutions.ca







More information about the mapserver-users mailing list