GRASS rasters and legends

Neil Best nbest at LANWORTH.COM
Mon Sep 17 14:37:20 PDT 2007


I was doing very well with rendering GRASS integer rasters until I tried 
to set up some CLASSes for creating a legend.  Without a classification 
Mapserver was pulling the colors from the GRASS color table quite 
nicely, but as soon as I set up the CLASSes and got a suitable legend my 
map images were hosed with nonsense colors.  I expected to be able to 
say EXPRESSION "1" for GRASS CAT=1. I got some semblance of the underlying 
data to appear by specifying PROCESSING "SCALE=AUTO", but no other 
tweaks of EXPRESSIONS or using [red], [green], and [blue] instead of 
[pixel] or adjusting PROCESSING "SCALE= . . ." to reflect vaues 
indicated by gdalinfo or r.info (not the same) got me any closer. 
Specifically I am working with the 2006 Cropland Data Layer (CDL) from 
USDA NASS imported to GRASS with r.in.gdal.  I am running FWTools-1.3.6. 
 For now it seems like I'll have to have two LAYERs, one for the map 
and one for the legend.  Can anyone offer any insight on this?  What 
would it take to get Mapserver/GDAL to read GRASS categories and labels 
(assuming it doesn't already and I'm simply ignorant)?  We might be 
interested in sponsoring such work under the right circumstances -- 
anyone else?  Thanks.

See you at FOSS4G2007.

Neil

Neil Best <nbest at lanworth.com>     Project Analyst
Lanworth, Inc.         (formerly Forest One, Inc.)
300 Park Blvd, Suite 425          Itasca, IL 60143
tel 630 250 7598 fax 630 672 7500 www.Lanworth.com



More information about the MapServer-users mailing list