[GRASS-user] Questions about r.mfilter

Glynn Clements glynn at gclements.plus.com
Wed Apr 14 06:41:00 EDT 2010


Casey Vandenberg wrote:

> Does anyone know if the r.mfilter will support negative values in the 
> matrix filter file. I was hoping to do a high pass filter on a dataset, 
> so I created a filter for input in the following format, but it will not 
> work.
> 
> TITLE       HighPass3x3
> MATRIX    3
> -1 -1 -1
> -1 8 -1
> -1 -1 -1
> DIVISOR   9
> TYPE        S
> 
> Input command is:
> r.mfilter input=Mag_12.5 at LaIndia output=HighPass3x3_Mag12.5 
> filter=/home/cvandenberg/Documents/Filters/HighPass3x3.txt*
> **ERROR: Filter file format error*

This error message occurs if the DIVISOR, TYPE or START keywords are
encountered before a matrix has been defined.

Also, a sequential filter ("TYPE S") is incorrect for most cases
(including this one).

There aren't any issues with negative numbers.

Note that you can also use "r.neighbors weight=... method=sum" to
apply a matrix filter.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-user mailing list