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

NAME

6       r.cats  - Prints category values and labels associated with user-speci‐
7       fied raster map layers.
8

KEYWORDS

10       raster
11

SYNOPSIS

13       r.cats
14       r.cats help
15       r.cats  map=name   [vals=value[,value,...]]    [cats=range[,range,...]]
16       [fs=character|space|tab]
17
18   Parameters:
19       map=name
20           Name of input raster map
21
22       vals=value[,value,...]
23           Comma separated value list: e.g. 1.4,3.8,13
24
25       cats=range[,range,...]
26           Category list: e.g. 1,3-8,13
27
28       fs=character|space|tab
29           Output separator character (default: tab)
30

DESCRIPTION

32       r.cats  prints  the category values and labels for the raster map layer
33       specified by map=name to standard output.
34
35       The user can specify all needed parameters on the command line, and run
36       the  program  non-interactively. If the user does not specify any cate‐
37       gories (e.g., using  the  optional  cats=range[,range,...]   argument),
38       then  all the category values and labels for the named raster map layer
39       that occur in the map are printed.   The  entire  map  is  read,  using
40       r.describe,  to determine which categories occur in the map. If a list‐
41       ing of categories is specified, then the labels  for  those  categories
42       only  are printed. The cats may be specified as single category values,
43       or as ranges of values. The user may also (optionally) specify  that  a
44       field separator other than a space or tab be used to separate the cate‐
45       gory value from its corresponding category  label  in  the  output,  by
46       using  the  fs=character|space|tab  option  (see  example below). If no
47       field separator is specified by the user, a tab  is  used  to  separate
48       these fields in the output, by default.
49
50       The  output  is sent to standard output in the form of one category per
51       line, with the category value first on the  line,  then  an  ASCII  TAB
52       character (or whatever single character or space is specified using the
53       fs parameter), then the label for the category.
54

EXAMPLES

56        r.cats map=soils
57              prints the values and labels associated with all  of  the  cate‐
58              gories in the soils raster map layer;
59
60        r.cats map=soils cats=10,12,15-20
61              prints  only  the category values and labels for soils map layer
62              categories 10, 12, and 15 through 20; and
63
64        r.cats map=soils
65              cats=10,20 fs= : prints the values  and  labels  for  soils  map
66              layer  categories  10 and 20, but uses ":" (instead of a tab) as
67              the character separating the category values from  the  category
68              values in the output.
69
70       Example output:
71
72       10:Dumps, mine, Cc
73       20:Kyle clay, KaA
74

NOTES

76       Any ASCII TAB characters which may be in the label are replaced by spa‐
77       ces.
78
79       The output from r.cats can be redirected into a  file,  or  piped  into
80       another program.
81

SEE ALSO

83       UNIX Manual entries for awk and sort
84
85       r.coin, r.describe, d.what.rast, r.support
86

AUTHOR

88       Michael Shapiro, U.S. Army Construction Engineering Research Laboratory
89
90       Last changed: $Date: 2003/05/06 12:40:55 $
91
92       Full index
93
94
95
96GRASS 6.2.2                                                          r.cats(1)
Impressum