1r.what.color(1)               Grass User's Manual              r.what.color(1)
2
3
4

NAME

6       r.what.color  - Queries colors for a raster map layer.
7

KEYWORDS

9       raster
10

SYNOPSIS

12       r.what.color
13       r.what.color help
14       r.what.color   [-i]   input=string   [value=float[,float,...]]    [for‐
15       mat=string]   [--verbose]  [--quiet]
16
17   Flags:
18       -i
19           Read values from stdin
20
21       --verbose
22           Verbose module output
23
24       --quiet
25           Quiet module output
26
27   Parameters:
28       input=string
29           Name of existing raster map to query colors
30
31       value=float[,float,...]
32           Values to query colors for
33
34       format=string
35           Output format (printf-style)
36           Default: %d:%d:%d
37

DESCRIPTION

39       r.what.color outputs the color associated with user-specified  category
40       values in a raster input map.
41
42       Values may be specified either using the values= option, or by specify‐
43       ing the -i flag and passing the values on stdin, one per line.
44
45       For each value which is specified, a line of output will  be  generated
46       consisting of the category value followed by the color, e.g.:
47       r.what.color input=elevation.dem value=1500
48       1500: 223:127:31
49
50
51       If the input map is an integer (CELL) map, the category will be written
52       as an integer (no decimal point),  otherwise  it  will  be  written  in
53       floating point format (printf("%f") format).
54
55       If  the lookup fails for a value, the color will be output as an aster‐
56       isk, e.g.:
57       r.what.color input=elevation.dem value=9999
58       9999: *
59
60
61       If a value cannot be parsed, both the value and the color will be  out‐
62       put as an asterisk, e.g.:
63       r.what.color input=elevation.dem value=bogus
64       *: *
65
66
67       The format can be changed using the format= option. The value should be
68       a printf()-style format string containing three  conversion  specifiers
69       for the red, green and blue values respectively, e.g.:
70       r.what.color input=elevation.dem value=1500 format='%02x:%02x:%02x'
71       1500: df:7f:1f
72
73
74       If  your system supports the %m$ syntax, you can change the ordering of
75       the components, e.g.:
76       r.what.color        input=elevation.dem         value=1500         for‐
77       mat='%3$02x:%2$02x:%1$02x'
78       1500: 1f:7f:df
79
80
81       Common formats:
82
83                     Tcl/Tk: format="#%02x%02x%02x"
84
85                     WxPython:      format='"#%02x%02x%02x"'      or      for‐
86                     mat='"(%d,%d,%d)"'
87

SEE ALSO

89        r.what
90

AUTHOR

92       Glynn Clements
93
94       Full index
95
96       © 2003-2008 GRASS Development Team
97
98
99
100GRASS 6.3.0                                                    r.what.color(1)
Impressum