[GRASS-dev] [GRASS GIS] #2180: r.li.shannon - r.li.pielou

#2180: r.li.shannon - r.li.pielou
---------------------------------------+------------------------------------
Reporter: matmar | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.4
Component: Raster | Version: unspecified
Keywords: r.li.shannon, r.li.pielou | Platform: Linux
      Cpu: x86-64 |
---------------------------------------+------------------------------------
Hi,[[BR]]

r.li.shannon (and consequently r.li.pielou) returns the wrong output when
"Whole Maplayer / Select areas from the overlayed vector map" option is
used to build the configuration file. I attached everything's needed to
replicate the error (with r.li.shannon).

'''example.ascii''' Simulated Landcover map.[[BR]]

'''example_vect''' Polygon used to calculate the index.[[BR]]

'''conf''' r.li.setup configuration file built using "Selet areas from the
overlayed vector map" option. (Wrong shannon index).[[BR]]

'''conf_whole_whole''' r.li.setup configuration file built using "Whole
Maplayer / Whole Maplayer" option. (Correct Shannon index).[[BR]]

Formula to calculate the correct Shannon index for the example landscape
(paste it in R):

''-(((10/16)*log(10/16))+((2/16)*log(2/16))+((1/16)*log(1/16))+((3/16)*log(3/16)))''

Cheers,[[BR]]
Matteo

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

#2180: r.li.shannon - r.li.pielou
---------------------------------------+------------------------------------
Reporter: matmar | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.4
Component: Raster | Version: unspecified
Keywords: r.li.shannon, r.li.pielou | Platform: Linux
      Cpu: x86-64 |
---------------------------------------+------------------------------------

Comment(by matmar):

Before testing it you have to patch r.li modules with the patch included
in #2024

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

#2180: r.li.shannon - r.li.pielou
---------------------------------------+------------------------------------
Reporter: matmar | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.4
Component: Raster | Version: unspecified
Keywords: r.li.shannon, r.li.pielou | Platform: Linux
      Cpu: x86-64 |
---------------------------------------+------------------------------------

Comment(by mmetz):

Replying to [ticket:2180 matmar]:
>
> r.li.shannon (and consequently r.li.pielou) returns the wrong output
when "Whole Maplayer / Select areas from the overlayed vector map" option
is used to build the configuration file.

r.li.shannon as well as related modules (dominance, pielou, renyi,
simpson) are fixed in trunk r59072.

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

#2180: r.li.shannon - r.li.pielou
---------------------------------------+------------------------------------
Reporter: matmar | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.4
Component: Raster | Version: unspecified
Keywords: r.li.shannon, r.li.pielou | Platform: Linux
      Cpu: x86-64 |
---------------------------------------+------------------------------------

Comment(by mmetz):

Replying to [comment:2 mmetz]:
> Replying to [ticket:2180 matmar]:
> >
> > r.li.shannon (and consequently r.li.pielou) returns the wrong output
when "Whole Maplayer / Select areas from the overlayed vector map" option
is used to build the configuration file.
>
> r.li.shannon as well as related modules (dominance, pielou, renyi,
simpson) are fixed in trunk r59072.

After more testing and bugfixing with matmar, the r.li modules seem to be
stable in G7: no more crashes, and the results are in our tests correct.
While the r.li.setup replacement in G7 is still work in progress,
r.li.setup in G6 works, but all other r.li modules in G6 must be
considered as not functional. With luck, they don't crash, and with even
more luck, the result is correct, but most likely it is not.

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

#2180: r.li.shannon - r.li.pielou
---------------------+------------------------------------------------------
  Reporter: matmar | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 6.4.4
Component: Raster | Version: unspecified
Resolution: fixed | Keywords: r.li.shannon, r.li.pielou
  Platform: Linux | Cpu: x86-64
---------------------+------------------------------------------------------
Changes (by neteler):

  * status: new => closed
  * resolution: => fixed

Comment:

Rewrite from trunk backported in r59304.

Closing here, continued in bug #1214.

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