Re: [GRASS-user] About r.neighbors weight usage

2014-06-02 Thread Glynn Clements

m roy wrote:

> i'm trying to use r.neighbors with the weight option along with the sum 
> function;
> maibe i do not get how it's supposed to work...
> 
> this is what i'm using:
> 
> Neighborhood operation: sum
> Neighborhood size: 3
> 
> Weight:
> 
> 0 0 0
> -1 0 1
> 0 0 0
> 
> and i get a null result.

You get a null result if the total number of values is zero. For a
weighted sum, "the total number of values" is the sum of the weights,
which in this case is zero.

I'd suggest that r.mfilter may be more appropriate for implementing
discrete convolution (FIR) filters.

-- 
Glynn Clements 
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] About r.neighbors weight usage

2014-06-02 Thread m roy
Dear list,

i'm trying to use r.neighbors with the weight option along with the sum 
function;
maibe i do not get how it's supposed to work...

this is what i'm using:

Neighborhood operation: sum
Neighborhood size: 3

Weight:

0 0 0
-1 0 1
0 0 0

and i get a null result.

This second filter i've tested seems to work:

Neighborhood operation: sum
Neighborhood size: 3

Weight:

0 0 0
1 0 1
0 0 0

tested on GRASS 6.4.3 both on windows and ubuntu

thanks,

roy.


  ___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user