[GRASS-user] Application of r.color

Micha Silver micha at arava.co.il
Fri Oct 1 13:48:14 EDT 2010


On 10/01/2010 04:16 PM, Luis Lisboa wrote:
> Hi there
>
> I have a script where I create a map (using mapcalc) and I want to 
> attribute a color (gray for instance) but it ranges from 0 to 5 so I 
> cannot attribute gray0-1 neither gray0-255. What can I do to attribute 
> a color table that stretches its color attibution to the image max and 
> minimum values?
>
How about creating a color rules file with percentages (instead of 
values), then, regardless of the actual raster values, the colors will 
be "automatically" spread between the min and max color. i.e.
0% 0 0 0
100% 255 255 255
This will create a spread of colors from black to white. Now in your 
script just apply this rules file. If the raster contains 5 values, they 
will get colored black, dark grey, mid grey, light grey, and white.

> Thanks
>
> Luis
>
> This mail was received via Mail-SeCure System.
>
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
> This mail was received via Mail-SeCure System.
>
>
>    


-- 
Micha Silver
Arava Development Co. +972-52-3665918
http://surfaces.co.il


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20101001/e319c575/attachment.html


More information about the grass-user mailing list