[GRASS-dev] [GRASS GIS] #510: bad display in the Output window for r.report and r.stats with aspect maps.

#510: bad display in the Output window for r.report and r.stats with aspect maps.
-------------------------+--------------------------------------------------
Reporter: clerici | Owner: grass-dev@lists.osgeo.org
     Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: default | Version: 6.4.0 RCs
Keywords: | Platform: Linux
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
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.[[BR]]

In detail:[[BR]]
1) r.report for aspect map in Spearfish gives always bad (and different)
results as reported in the attachment N.1[[BR]]
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

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/510&gt;
GRASS GIS <http://grass.osgeo.org>

#510: bad display in the Output window for r.report and r.stats with aspect maps.
----------------------+-----------------------------------------------------
  Reporter: clerici | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: default | Version: 6.4.0 RCs
Resolution: | Keywords:
  Platform: Linux | Cpu: Unspecified
----------------------+-----------------------------------------------------
Comment (by hamish):

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

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/510#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#510: bad display in the Output window for r.report and r.stats with aspect maps.
----------------------+-----------------------------------------------------
  Reporter: clerici | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: default | Version: 6.4.0 RCs
Resolution: | Keywords:
  Platform: Linux | Cpu: Unspecified
----------------------+-----------------------------------------------------
Comment (by hamish):

can anyone else reproduce this?

Hamish

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/510#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#510: bad display in the Output window for r.report and r.stats with aspect maps.
----------------------+-----------------------------------------------------
  Reporter: clerici | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: default | Version: 6.4.0 RCs
Resolution: | Keywords:
  Platform: Linux | Cpu: Unspecified
----------------------+-----------------------------------------------------
Comment (by mlennert):

Replying to [comment:2 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

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/510#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#510: bad display in the Output window for r.report and r.stats with aspect maps.
----------------------+-----------------------------------------------------
  Reporter: clerici | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: Tcl | Version: 6.4.0 RCs
Resolution: | Keywords:
  Platform: All | Cpu: Unspecified
----------------------+-----------------------------------------------------
Changes (by hamish):

  * platform: Linux => All
  * component: default => Tcl

Comment:

> Replying to [comment:2 hamish]:
> > can anyone else reproduce this?

Replying to [comment:3 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

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/510#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#510: bad display in the Output window for r.report and r.stats with aspect maps.
----------------------+-----------------------------------------------------
  Reporter: clerici | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: Tcl | Version: 6.4.0 RCs
Resolution: | Keywords:
  Platform: All | Cpu: Unspecified
----------------------+-----------------------------------------------------
Comment (by cmbarton):

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

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/510#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>

#510: bad display in the Output window for r.report and r.stats with aspect maps.
-----------------------------------------+----------------------------------
Reporter: clerici | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: Tcl/Tk | Version: 6.4.0 RCs
Keywords: gronsole.tcl buffer overrun | Platform: All
      Cpu: Unspecified |
-----------------------------------------+----------------------------------
Changes (by hamish):

  * keywords: => gronsole.tcl buffer overrun

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/510#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>