[Mapserver-users] GRASS raster from GDAL

Frank Warmerdam warmerdam at pobox.com
Thu Apr 3 09:35:33 EST 2003


Jan Hartmann wrote:
> Matt,
> 
> As far as I have experimented, there are two ways of accessing GRASS 
> data with GDAL:
> 
> - Standalone GDAL utilities, like gdalinfo and gdal_translate use the 
> .grassrc5 file in the $HOME-directory. Any mapset in the current 
> database location can be accessed by its name or qualified name (e.g. 
> nations, or nations at PERMANENT in the "global" database). According to 
> the README in the libgrass distribution, MapServer uses the .grassrc5 
> file in the Document_Root directory of the Apache webserver, but that 
> didn't work with me.

Jan / Matt,

The use of .grassrc is based on the libgrass code, and it might well
be problematic in mapserver environment running under a web server.

> - Alternatively, you can use the full path to the raster layer in the 
> cellhd subdirectory, irrespective of .grassrc5: 
> $HOME/grass5/data/global/PERMANENT/cellhd/nations.
> This works both with MapServer and the standalone applications. I'm not 
> quite clear how GDAL handles GRASS colortables.

A pseudo-colored GRASS raster should be treated the same as any other
pseudocolored GDAL supported raster in MapServer.  Note, only raster
values 0-255 will be handled properly.  All other raster values will
normally be truncated to 255.  There are some additional options about
scaling in MapServer 3.7, but you can't currently have an arbitrary number
of raster values with colors associated.

Perhaps this limitation will be lifted in the future.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent





More information about the mapserver-users mailing list