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

GRASS GIS trac at osgeo.org
Wed Jan 29 07:04:12 PST 2014


#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>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list