[GRASS-dev] r.colors now producing bogus color files for 'ryg' case

Hamish hamish_nospam at yahoo.com
Wed May 30 03:44:09 EDT 2007


Dylan Beaudette wrote:
> 
> A colleague of mine just noticed that the command
> r.colors map=some_map color=ryg
> 
> the resulting colr file was malformed.
> 
> This seems to have been introduced fairly recently into CVS.


works for me, both CELL and DCELL maps. can you provide more info?
(spearfish)

G63> r.colors elevation.10m col=ryg   # DCELL
G63> r.info -r elevation.10m
min=1061.064087
max=1846.743408

G63> r.colors elevation.dem col=ryg   # CELL
G63> r.info -r elevation.dem
min=1066
max=1840

G63> cat colr2/PERMANENT/elevation.*
% 1061 1846
1061:255:0:0 1453.5:255:255:0
1453.5:255:255:0 1846:0:255:0
% 1066 1840
1066:255:0:0 1453:255:255:0
1453:255:255:0 1840:0:255:0


I notice that the range of the DCELL map is greater than the range of
its color map, so max values will be shown as the null value color
(nv white). Something cast to int when it should use ceil(max) and
floor(min)?  How does that work if the data range is 0.0-1.0?


Hamish




More information about the grass-dev mailing list