Allar Haav wrote:

> I noticed today that "average" method in r.neighbours gives an incorrect 
> value. Let me give you an example:

> 3) Judging from previous steps, it should be only logical that the 
> output raster has values from 0 to 1. However it seems that 0.5 has been 
> added:


When the output is an integer map, the result of the average, variance
and stddev methods is supposed to be rounded to the nearest integer
(rather than towards zero), so 0.5 is added prior to truncation.

r54820 removed the option to generate integer output maps, so the
"is the output map integer" check became redundant. But rather than
changing it to never adding 0.5, now it's always added.

This should be fixed by r57064.

-- 
Glynn Clements <gl...@gclements.plus.com>
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to