[GRASS-dev] RE: [GRASS-user] Errors applying color rules and -g flags in r.colors

Patton, Eric epatton at nrcan.gc.ca
Thu Apr 19 13:59:11 EDT 2007


Thanks for looking at this, Glynn. Comments interspersed below.


Patton, Eric wrote:

>> I'm having trouble getting the new r.color -g flag to do anything. Or,
>> more correctly, maybe it's working properly, but I just can't tell if
>> it's doing anything or not.
>> 
>> Running r.colors -g produces a blank display in gis.m on an ordinary raster dataset:
>> 
>> ~ >g.region rast=IsaacsHarbour_HDCS_1m_grd_fill at PERMANENT
>> ~ >
>> ~ >r.colors -g map=IsaacsHarbour_HDCS_1m_grd_fill at PERMANENT color=rainbow
>> Color table for [IsaacsHarbour_HDCS_1m_grd_fill at PERMANENT] set to rainbow
>> ~ >

Glynn:
>Can you provide details of the map, specifically whether it is integer
>or FP, and the range?

Yes, the raster is floating point; r.info -r gives:

r.info -r IsaacsHarbour_HDCS_1m_grd_fill
min=-16.806999
max=-1.215008

Glynn:
>This is a bug in the new code; I forgot that:
>
>	if (sscanf(value, "%lf%%", &x) == 1)
>
>
>will be true regardless of whether or not there is a percent sign
>after the value, so it's treating all values as percentages. I'll
>commit the following change shortly

Great, thanks! I'll test it an report back.

~ Eric.






More information about the grass-dev mailing list