[GRASS-user] edit category information?

Markus Neteler neteler at itc.it
Thu Sep 6 07:57:18 EDT 2007


Hamish wrote on 09/06/2007 12:45 PM:
> Kirk Wythers wrote:
>   
>> I am looking to edit a raster map's category information.
>>     
> ..
>   
>> I would like to add category names (Oak, Pine, Spruce, etc...) to  
>> these numbers.I have been looking around for a way to do it  
>> (r.reclass?, r.recode?). I'm just not sure what is the "approved"  
>> approach here. Any suggestions?
>>     
>
>
> r.support will do it in interactive mode from the command line. That
> uses the funny old esc-enter interface, but it works.
>
> or edit the $MAPSET/cats/$MAPNAME file by hand, it's a simple text file.
> Use one of the categorical spearfish maps as an example.
>   
How complicated would it be to develop an optional tcl frontend (like
g.mapsets has) for
r.support/cats editing? The format isn't that complicated (4 header
lines, then ':' separated):

cat nc_spm_06/PERMANENT/cats/landuse96_28m
# 24 categories
South-West Wake county: NC Land Use 1996 clipped

0.00 0.00 0.00 0.00
0:not classified
1:High Intensity Developed
2:Low Intensity Developed
[...]

Markus

------------------
ITC -> dall'1 marzo 2007 Fondazione Bruno Kessler
ITC -> since 1 March 2007 Fondazione Bruno Kessler
------------------




More information about the grass-user mailing list