[GRASSLIST:5800] Re: Trouble with raster maps and colour ranges.

Glynn Clements glynn.clements at virgin.net
Tue Mar 18 19:04:20 EST 2003


Gordon Keith wrote:

> >   I am using grass5 on a Linux server and I have imported BIL raster
> > files using r.in.gdal. The raster files have been supplied from a 1
> > metre dataset of the entire Australian geographic region. The problem
> > I am having is that the .hdr files for the BIL raster files indicates
> > different bit depths for different raster images. When I display the
> > images I get problems as the colour ranges for some tiles are not the
> > same as for others, hence when using the elevation data I end of with
> > that appears to be a 1500km long dead straight cliff face of at least
> > 500m height that runs right through the middle of Outback Australia.
> >
> > What I would like to know is there any way of having the raster
> > images imported correctly to allow for this disparity in colour
> > depths.?
> 
> Try applying a common colour map to all images:
> 
> for image in <name of images> ; do
> r.colors map=$image color=rules <<EOF
> 0 green
> 100 blue
> 500 red
> 1000 yellow
> 1500 orange
> 2000 brown
> end
> EOF
> done

Also, once you have created one map with a given colour table, you can
use "r.colors map=dest_map rast=src_map" to use the same colours for
another map.

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-user mailing list