Re: [GRASS-user] Re: Command to summarize the frequency distribution table
Dear Glynn: thank you good advice. > Reclass maps only work for integers I see, I understood the cause from your advice. > Alternatively, if the intervals are equally spaced, you could generate > an integer version by scaling, e.g.: > > r.mapcalc 'newmap = int(oldmap * 10)' > r.mapcalc has a wonderful function, I think. Okey,it's a nice method. I'll try again. Thank you. Yasuo SHIMADA -- > sgw00...@nifty.com wrote: > > > Thank you useful and kind advice. > > Sorry, please give advice to me a little more. > > > > I tried the re-classification by using r.reclass method in the raster map > > of the > > probability distribution. > > > I want to classify it at 0.1 intervals. So I wrote text files as follows: > > --- > > 0.0 thru 0.1=0 A > > 0.1 thru 0.2=2 B > > 0.3 thru 0.4=3 C > > 0.4 thru 0.5=4 D > > > > 0.9 thru 1.0=10 J > > end > > --- > > > > then, I saved as probability_class.txt > > > > r.reclass input=old_rast_map output=new_rast_map < probability_class.txt > > > > then, following massage printed out on display: > > - > > 0.50 rounded up to 0 > > 0.60 rounded up to 0 > > > Why ? What's happened ? > > I do not understand the cause not appropriately classified. > > Reclass maps only work for integers (they are implemented by looking > up the original cell values in an array, and you can't use > floating-point values as array indices). > > You can use r.recode to generate a new map using a piecewise-linear > mapping. The category labels need to be set separately using > r.category. > > Alternatively, if the intervals are equally spaced, you could generate > an integer version by scaling, e.g.: > > r.mapcalc 'newmap = int(oldmap * 10)' > ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Re: Command to summarize the frequency distribution table
sgw00...@nifty.com wrote: > Thank you useful and kind advice. > Sorry, please give advice to me a little more. > > I tried the re-classification by using r.reclass method in the raster map of > the > probability distribution. > I want to classify it at 0.1 intervals. So I wrote text files as follows: > --- > 0.0 thru 0.1=0 A > 0.1 thru 0.2=2 B > 0.3 thru 0.4=3 C > 0.4 thru 0.5=4 D > > 0.9 thru 1.0=10 J > end > --- > > then, I saved as probability_class.txt > > r.reclass input=old_rast_map output=new_rast_map < probability_class.txt > > then, following massage printed out on display: > - > 0.50 rounded up to 0 > 0.60 rounded up to 0 > Why ? What's happened ? > I do not understand the cause not appropriately classified. Reclass maps only work for integers (they are implemented by looking up the original cell values in an array, and you can't use floating-point values as array indices). You can use r.recode to generate a new map using a piecewise-linear mapping. The category labels need to be set separately using r.category. Alternatively, if the intervals are equally spaced, you could generate an integer version by scaling, e.g.: r.mapcalc 'newmap = int(oldmap * 10)' -- Glynn Clements ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Move vertex in v.digit releasebranch
Hello everybody! I am testing the releasebranch with the wxpython interface and I found this little problem: - open roads from spearfish and start edit it - select the move vertex tool - after you select a vertex with the left click, if the button is pressed again by mistake, the display freeze. Thanks for your help. Luca -- View this message in context: http://www.nabble.com/Move-vertex-in-v.digit-releasebranch-tp21116086p21116086.html Sent from the Grass - Users mailing list archive at Nabble.com. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Re: Command to summarize the frequency distribution table
Dear Moritz and all Thank you useful and kind advice. Sorry, please give advice to me a little more. I tried the re-classification by using r.reclass method in the raster map of the probability distribution. An initial probability distribution is as follows: |MAP: (untitled) (maxent_v2 in PERMANENT) | |-| | Category Information| cell| square | |#|description | count|kilometers| |--| | 0-0.003801|from to . . . . . . . . .. . . . . . . | 25890| 52,649.00| |0.003801-0.007602|from to . . . . . . . . . .. . . . . . | 4738| 9625.82| ... ... |0.954007-0.957808|from to . . . . . . . . . . . . . . . . | 1| 1.97| | 0.965409-0.96921|from to . . . . . . . . . . . . . . . . | 1| 1.94 | |*|no data. . . . . . . . . . . . .. . . . . |134527|272,251.90| I want to classify it at 0.1 intervals. So I wrote text files as follows: --- 0.0 thru 0.1=0 A 0.1 thru 0.2=2 B 0.3 thru 0.4=3 C 0.4 thru 0.5=4 D 0.9 thru 1.0=10 J end --- then, I saved as probability_class.txt r.reclass input=old_rast_map output=new_rast_map < probability_class.txt then, following massage printed out on display: - 0.50 rounded up to 0 0.60 rounded up to 0 .. 1.40 rounded up to 1 1.50 rounded up to 1 - |-| |MAP: Reclass of maxent_v2 in PERMANENT (re_maxent in PERMANENT) | |-| | Category Information| cell| square | | #|description | count|kilometers| |-| | 5| . . . . . . . . . . . . . . . . . . . . . . . . . . . .| 39215| 79,669.75| |10| . . . . . . . . . . . . . . . . . . . . . . . . . . . .| 698| 1397.98| | *|no data. . . . . . . . . . . . . . . . . . . . . . . . .|134527|272,251.90| Why ? What's happened ? I do not understand the cause not appropriately classified. Best regard: Yasuo shimada Moritz Lennert ³ñF > On 16/12/08 14:40, sgw00...@nifty.com wrote: > > 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 > > > Note that you could have also done something similar with > > r.report map=old_rast_map units=k nsteps= > > playing around with nsteps to get the same ranges. But r.reclass + > r.stats/r.report gives you more precise control of your classes. > > Moritz ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] barin option in r.flow module
Hi Markus, Markus Neteler OSGeo wrote: > > Hi Luca, > > On Mon, Dec 15, 2008 at 4:07 PM, Casagrande Luca > wrote: >> >> Hello everybody, >> I have got some troubles using r.flow with this option..it stays forever >> at >> the: >> Reading input files: elevation... >> , barrier > > > With help from Glynn fixed in > 7.svn, > 6.4.svn, 6.4.0svn (= the new 6.4.0 release branch), > 6.3.svn. > > Thanks for the fix..I closed the ticket on the trac. Bye Luca -- View this message in context: http://www.nabble.com/barin-option-in-r.flow-module-tp21015531p21114479.html Sent from the Grass - Users mailing list archive at Nabble.com. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] v.to.rast3 - no output
Hi, 2008/12/21 Richard Chirgwin : [...] > Thanks, Martin. A supplementary question, if I may: how come I can't > find the output raster to display? It doesn't show in g.mlist ... > > RC > g.mlist rast3 ? Martin -- Martin Landa * http://gama.fsv.cvut.cz/~landa * ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] barin option in r.flow module
Hi Luca, On Mon, Dec 15, 2008 at 4:07 PM, Casagrande Luca wrote: > > Hello everybody, > I have got some troubles using r.flow with this option..it stays forever at > the: > Reading input files: elevation... > , barrier > If I remove the barin option, all is fine. > I am using the DEM from spearfish with GRASS 6.2.3 and latest 6.4svn. > Thanks > Luca With help from Glynn fixed in 7.svn, 6.4.svn, 6.4.0svn (= the new 6.4.0 release branch), 6.3.svn. Cheers Markus ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user