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

Dylan Beaudette dylan.beaudette at gmail.com
Wed May 30 18:33:16 EDT 2007


On Wednesday 30 May 2007 00:44, Hamish wrote:
> 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

Thanks for the follow-up Hamish. I am rather mystified by this problem myself 
as the rules file in '/usr/local/grass-xxx/etc/color/ryg' looks fine. The 
dataset that caused this mess ranges from 0.1 - 0.6. Other other color ramps 
appear to work fine. The resultant colr file had something like 

0%
0:127:0 0:127:0

in it.. I can check again if that looks like it might mean something.

dylan

-- 
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341




More information about the grass-dev mailing list