[GRASS-user] Re: Command to summarize the frequency distribution table

SGW00412 at nifty.com SGW00412 at nifty.com
Tue Dec 16 08:40:07 EST 2008


Dear Moritz:

I wish to express my gratitude for your valuable advice. Thank you. 
It succeeded when having tried as follows:

0 thru 100=1 0-100m
100 thru 200=2 100-200m
200 thru 300=3 200-300m
300 thru 400=4 300-400m
....
end

save as alt_class.txt

r.reclass input=old_rast_map output=new_rast_map < alt_class.txt

r.stats new_rast_map -c

Thanks !!

Best regard
Yasuo shimada
----
Moritz Lennert <mlennert at club.worldonline.be>‚³‚ñF
> On 09/12/08 15:43, SGW00412 at nifty.com wrote:
> > Dear Moritz and all
> > 
> >> r.stats or r.report
> > 
> > Thank you for profitable advice. 
> > When this command was used, the table is output as follows:. 
> > 
> > |---------------------------------------------------|
> > |         Category Information           |  square  |
> > |  #|description                         |kilometers|
> > |---------------------------------------------------|
> > |  1| . . . . . . . . . . . . . . . . . .|     37.30|
> > |  2| . . . . . . . . . . . . . . . . . .|      5.89|
> > |  3| . . . . . . . . . . . . . . . . . .|      5.89|
> > |  4| . . . . . . . . . . . . . . . . . .|      7.85|
> 
> This means that your elevation map is already a reclassified map with
> elevation classes, but that you did not include the information about
> the classes in the reclassed map. I.e., using r.reclass, you can do
> something like this:
> 
> 0 thru 10 = 1
> 
> but if you want to keep the information about the class amplitude, then
> you have to do this (adding a label to each class):
> 
> 0 thru 10 = 1 0 - 10m
> 
> You can also add labels to the existing classes, using r.category. Just
> create a text file:
> 
> 1: 0 - 10 m
> 2:11 - 20 m
> 3:21 - 30 m
> ...
> 
> and run r.category map=YourMap rules=TextFile.
> 
> Then r.report will include these labels.
> 
> 
> Moritz


More information about the grass-user mailing list