[GRASS-dev] [grass-code I][508] r.colors: last 100% rule is
forgotten
grass-dev at grass.itc.it
grass-dev at grass.itc.it
Wed Oct 10 02:37:16 EDT 2007
code I item #508, was opened at 2007-10-10 19:37
Status: Open
Priority: 3
Submitted By: Hamish Bowman (hamish)
Assigned to: Nobody (None)
Summary: r.colors: last 100% rule is forgotten
Issue type: module bug
Issue status: None
GRASS version: 6.2
GRASS component: raster
Operating system: Linux
Operating system version: debian/etch
GRASS CVS checkout date, if applies (YYMMDD):
Initial Comment:
as reported on the mailing list:
http://article.gmane.org/gmane.comp.gis.grass.devel/22645
There seems to be a bug in r.colors in 6.2 and 6.3.
e.g. for a CELL map containing values of [0-255], if the rules file looks
like this:
0% 0:0:0 37.5% 255:0:0
37.5% 255:0:0 75% 255:255:0
75% 255:255:0 100% 255:255:255
the colr/ file looks like this:
% 0 191.25
0:0 95.625:255:0:0
95.625:255:0:0 191.25:255:255:0
ie the last 100% rule is forgotten.
Same if I give it real values:
G63> r.colors gebco_bathy col=rules << EOF
> 0 0:0:0 95.625 255:0:0
> 95.625 255:0:0 191.25 255:255:0
> 191.25 255:255:0 255 255:255:255
> EOF
WARNING: Your color rules do not cover the whole range of data!
(rules 0.000000 to 191.250000 but data 0.000000 to 255.000000)
???
the usual way to give percentage is typically 1 rule per line, which
is why we haven't noticed this before:
0% 0:0:0
37.5% 255:0:0
75% 255:255:0
100% 255:255:255
----------------------------------------------------------------------
You can respond by visiting:
http://wald.intevation.org/tracker/?func=detail&atid=204&aid=508&group_id=21
More information about the grass-dev
mailing list