[GRASS-user] edit category information?
Hamish
hamish_nospam at yahoo.com
Thu Sep 6 23:40:29 EDT 2007
Michael Barton wrote:
> The main thing needed first is a way to get category information INTO
> r.support from a file and/or stdin. Basically, it needs a "rules" file
> option like has been added to r.reclass and r.recode. If it had the same
> syntax as r.reclass, it would simplify things from a user point of
> view. We could then just use the same simple 'rules' interface to
> change categories and labels on an existing map as we do to reclassify
> a map. e.g....
>
> 0 = 0 not classified
> 1 thru 2 = 1 developed
You can't add that to r.support as the module is too general, it's not
just for cats.
it would either need two options:
rules=<<data>>
and
what_the_input_data_is=cats
or a bunch of flags to control that.
Seems messy- Probably better to have a new r.support.cats module to take
care of that? Writing the cats file is so simple I don't know if it
really needs its own C module, or if you can just write out the file
directly from the GUI.
the cats file format is detailed in sections 5.4 and! 12.11.9.2 of the
GRASS 5.0 Programmer's Manual. (I'm not sure where it is in the GRASS 6
prog manual) Note there are two different map titles, one from the cats
file, the other from the hist file (in r.info "title_cats (title_hist)")
Cat labels can be dynamic, see
https://intevation.de/rt/webrt?serial_num=2437
e.g. 'r.neighbors method=diversity' creates a dynamic cats/ file.
Hamish
More information about the grass-user
mailing list