[GRASSLIST:2754] Reclassify with r.stats and awk

Christof Bigler christof.bigler at colorado.edu
Wed Feb 25 21:19:13 EST 2004


I tried to reclassify a grid map. However, instead of getting the 
category labels, I get zeros. You see the problem here:

GRASS 5.0.2 > r.stats -l in=rt.rmris.ct.r
r.stats:  100%
19564 TSF
19578 TSF
19642 GRA
19657 TSF
19680 GRA
19719 TSF
19736 TSF
19738 TAA
...

That's what I expect to get.

GRASS 5.0.2 > r.stats -l in=rt.rmris.ct.r | awk '{printf "%d=%d\n", $1, 
$2}'
r.stats:  100%
19564=0
19578=0
19642=0
19657=0
19680=0
19719=0
19736=0
19738=0
...

Why is the second column replaced by zeros? Do I need first to replace 
the category labels with e.g. integer values?

Thanks for any help!

Christof




More information about the grass-user mailing list