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

Gordon Keith gordon.keith at csiro.au
Tue Mar 18 18:22:21 EST 2003


On Wed, 19 Mar 2003 09:58 am, Nicholls, Ian wrote:
> Hi
>   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

See the man page for r.colors for details 
http://grass.itc.it/gdp/html_grass5/html/r.colors.html

You can specify RGB values instead of colour names if you prefer.

Hope this helps
Gordon

-- 

Gordon Keith
Programmer/Data Analyst
Marine Acoustics
CSIRO Marine Research
http://www.marine.csiro.au

"I think there is a world market for maybe five computers"
- Thomas Watson, Chairman of IBM, 1943




More information about the grass-user mailing list