[Mapserver-users] raster legend

Matt Doggett mdoggett at coas.oregonstate.edu
Fri May 30 16:30:27 PDT 2003


I tried specifying several CLASS definitions for my raster LAYER, but to
no avail--nothing showed up in the legend.  Perhaps I just did it wrong.
BTW, my attempt was using PHP/Mapscript to render the map/legend.  Which
is why I asked if anyone has done this. Maybe I should clarify...has
anyone done this using Mapscript?
I am aware of the HTML legend and using legend templates...that's how my
app runs, again using Mapscript.  But I haven't made any progress down
that road. Which, again, is why I'm asking...

Md

Ps. I think it would be great to have an "AUTO" class definition based
on my GRASS raster itself.

-----Original Message-----
From: mapserver-users-admin at lists.gis.umn.edu
[mailto:mapserver-users-admin at lists.gis.umn.edu] On Behalf Of Dean
Gadoury
Sent: Friday, May 30, 2003 1:43 PM
To: Frank Warmerdam
Cc: mdoggett at coas.oregonstate.edu; 'mapserver-users'
Subject: Re: [Mapserver-users] raster legend

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




_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users




More information about the MapServer-users mailing list