#2179: r.li.shannon - r.li.pielou
-------------------------+--------------------------------------------------
Reporter: matmar | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 6.4.4
Component: Default | Version: unspecified
Keywords: | Platform: Unspecified
Cpu: Unspecified |
-------------------------+--------------------------------------------------
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 the example that I used
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)))''
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2179>
GRASS GIS <http://grass.osgeo.org>