Opened 16 years ago

Last modified 9 years ago

#510 new defect

bad display in the Output window for r.report and r.stats with aspect maps.

Reported by: clerici Owned by: grass-dev@…
Priority: major Milestone: 6.4.6
Component: Tcl/Tk Version: 6.4.0 RCs
Keywords: gronsole.tcl buffer overrun Cc:
CPU: Unspecified Platform: All

Description

r.report and r.stats for aspect maps produce ordered tables if saved in a file but randomly disordered if displayed in the Output window.

In detail:
1) r.report for aspect map in Spearfish gives always bad (and different) results as reported in the attachment N.1
2) r.stats has a random behaviour as usually displays correct results, but sometimes the table is incorrect as in the example of the attachment N.2

No problem with GRASS6.3.

Greetings Aldo Clerici

Attachments (2)

attN.1.png (31.5 KB ) - added by clerici 16 years ago.
attN.2.png (28.4 KB ) - added by clerici 16 years ago.

Download all attachments as: .zip

Change History (9)

by clerici, 16 years ago

Attachment: attN.1.png added

by clerici, 16 years ago

Attachment: attN.2.png added

comment:1 by hamish, 16 years ago

I can't replicate the badly sorted r.report output, either from GIS.m or the command line.

Note that your r.stats result is missing some lines too, it seems to skip from 1.4% to 33%. Here I get the continuous set:

spearfish:G65> g.region rast=aspect
spearfish:G65> r.stats -a -p in=aspect | head -n 25
 100%
0-1.411765 537300.000000   0.20%
1.411765-2.823529 827100.000000   0.30%
2.823529-4.235294 882900.000000   0.32%
4.235294-5.647059 1002600.000000   0.37%
5.647059-7.058824 965700.000000   0.35%
7.058824-8.470588 1116000.000000   0.41%
8.470588-9.882353 919800.000000   0.34%
9.882353-11.294118 1382400.000000   0.51%
11.294118-12.705882 774000.000000   0.28%
12.705882-14.117647 1156500.000000   0.42%
14.117647-15.529412 978300.000000   0.36%
15.529412-16.941176 1044000.000000   0.38%
16.941176-18.352941 586800.000000   0.22%
18.352941-19.764706 1832400.000000   0.67%
19.764706-21.176471 1099800.000000   0.40%
21.176471-22.588235 1141200.000000   0.42%
22.588235-24 1195200.000000   0.44%
24-25.411765 1080000.000000   0.40%
25.411765-26.823529 1445400.000000   0.53%
26.823529-28.235294 1169100.000000   0.43%
28.235294-29.647059 1305900.000000   0.48%
29.647059-31.058824 1350900.000000   0.50%
31.058824-32.470588 1152900.000000   0.42%
32.470588-33.882353 1373400.000000   0.50%
33.882353-35.294118 1186200.000000   0.44%

the only problem I see is that there is too much whitespace after the "#|description" in the header for FP range mode.

|-----------------------------------------------------------------------------|
|MAP: aspect in degrees from east (aspect@PERMANENT in PERMANENT)             |
|-----------------------------------------------------------------------------|
|                   Category Information                    |  square  |   %  |
|                    #|description                                  |kilometers| cover|
|-----------------------------------------------------------------------------|
|           0-1.411765|from no aspect to 1 degree from east |  0.537300|  0.20|
|    1.411765-2.823529|from 1 degree from east to 3 degrees |  0.827100|  0.30|
|                     |from east                            |          |      |

So I'm not sure what's wrong at your end.

Hamish

comment:2 by hamish, 16 years ago

can anyone else reproduce this?

Hamish

in reply to:  2 ; comment:3 by mlennert, 16 years ago

Replying to hamish:

can anyone else reproduce this?

No for r.report, but yes for r.stats (both in gis.m, not on the command line). There seems to be a serious sorting issue with the r.stats output in the Output windows of gis.m. The output is not missing any lines, but these lines show up later.

Maybe an issue of speed of output and redirection to the output window ?

Moritz

in reply to:  3 comment:4 by hamish, 16 years ago

Component: defaultTcl
Platform: LinuxAll

Replying to hamish:

can anyone else reproduce this?

Replying to mlennert:

No for r.report, but yes for r.stats (both in gis.m, not on the command line). There seems to be a serious sorting issue with the r.stats output in the Output windows of gis.m. The output is not missing any lines, but these lines show up later.

Maybe an issue of speed of output and redirection to the output window ?

ah, yes. I can reproduce it from both modules in gis.m (both linux/latest 6.5svn and wingrass 6.4.0svn native installer), and d.m on linux.

it looks fine from the wxPython GUI in Wingrass.

Hamish

comment:5 by cmbarton, 15 years ago

I can replicate this too with r.stats. It seems to happen if you have a lot of data. The gronsole.tcl is fairly mysterious code in places. My only guess is that this output window was not designed to handle that much data coming in at once and the formatting lags the data stream.

Michael

comment:6 by hamish, 13 years ago

Keywords: gronsole.tcl buffer overrun added

comment:7 by neteler, 9 years ago

Milestone: 6.4.06.4.6
Note: See TracTickets for help on using tickets.