[GRASS-user] Precipitation color table?
lponti at infinito.it
Wed Sep 24 04:44:47 EDT 2008
> From: Hamish <hamish_b at yahoo.com>
> Subject: Re: [GRASS-user] Precipitation color table?
> To: GRASS user list <grass-user at lists.osgeo.org>, Markus Neteler
> <neteler at osgeo.org>
> Message-ID: <570989.41209.qm at web110014.mail.gq1.yahoo.com>
> Content-Type: text/plain; charset=us-ascii
> Markus wrote:
>> > anyone having a nice precipitation color table (e.g., range from 0mm
>> > to 2000mm)?
> you might find some nice ones here:
> convert those .cpt (ie GMT) color rules to something suitable for r.colors
> with the r.cpt2grass addon script.
Sorry, I omitted that in my reply to Markus because it had been
mentioned several times on the list -- my fault.
> or maybe one of the color scales here do the trick:
> I have converted a couple of those to GRASS r.colors rules files, here:
> conversion script are given in the SVN log messages of those if you would
> like to convert the euphotic depth rules. By the look of it their version
> of NDVI is staged and would best be converted by hand.
The SVN conversion script is something I have tried to figure out for a
while: great! It always challenges me to find ways to dynamically
generate raster color maps.
I have understood that the algorithm is able to scale a 0-255 color map
to the 0-65535 range; I am not sure how it could be adapted to scale to
any range of data. Questions:
- Why do you use 65535?
- Slope and Intercept: are they parameter of a linear regression to
convert 0-255 values to 0-65535?
- In the line:
10((Slope * (($1 +1)2 -1)) + Intercept), $2, $3, $4)}'
I am not sure what (($1 +1)2 -1)) does.
The goal would be to develop a script which would take the data range of
any raster and scale a 0-255 color rule to it.
Thanks and regards,
# scale 0-255 to 0-65535 and then convert to chlor-a values
More information about the grass-user