[GRASS-dev] problem with Rast_get_c_color()

Martin Landa landa.martin at gmail.com
Mon Aug 15 12:01:14 EDT 2011


Hi,

2011/8/15 Hamish <hamish_b at yahoo.com>:
>> Rast_make_colors(colors, "ryg", (CELL) 1, (CELL) 2);
>> val = 3;
>>
>> fn
>>
>> Rast_get_c_color((const CELL *) &val, &red, &grn, &blu, colors)
>>
>> returns 1 (color rule defined). I would expect no color
>> rules defined (return code 0) or am I wrong?
>
> perhaps it is returning the "default" (color_rules.c) color,
> or "*" color (color_read.c^) and so out-of-known rules returns
> the 'valid' color for out-of-range^^?

no, for val = 4 it returns 0.

Martin

-- 
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa


More information about the grass-dev mailing list