Opened 11 years ago
Closed 10 years ago
#2180 closed defect (fixed)
r.li.shannon - r.li.pielou
Reported by: | matmar | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 6.4.4 |
Component: | Raster | Version: | unspecified |
Keywords: | r.li.shannon, r.li.pielou | Cc: | |
CPU: | x86-64 | Platform: | Linux |
Description
Hi,
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.
example_vect Polygon used to calculate the index.
conf r.li.setup configuration file built using "Selet areas from the overlayed vector map" option. (Wrong shannon index).
conf_whole_whole r.li.setup configuration file built using "Whole Maplayer / Whole Maplayer" option. (Correct Shannon index).
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,
Matteo
Attachments (4)
Change History (8)
by , 11 years ago
by , 11 years ago
Attachment: | conf_whole_whole added |
---|
by , 11 years ago
Attachment: | example.ascii added |
---|
by , 11 years ago
Attachment: | example_vect.pack added |
---|
comment:1 by , 11 years ago
Before testing it you have to patch r.li modules with the patch included in #2024
follow-up: 3 comment:2 by , 11 years ago
Replying to 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.
comment:3 by , 11 years ago
Replying to mmetz:
Replying to 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.
comment:4 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
conf