[GRASS-user] mfilter (comparison with r.neighboors)

Thank you for your comments and suggestions.

Am I wrong to think that r.neighbors and r.mfilter, for a 3x3 window for example, should give me the same output. If not could you help me enlighten my comprehension of those two tools.

Cheers

_____
|______\ Thierry SCHMITT
      || Géologie Marine et Côtière
        || Marine and Coastal Geology
        || www.cidco.ca

----- Original Message ----
From: Glynn Clements <glynn@gclements.plus.com>
To: Jarosław Jasiewicz <jarekj@amu.edu.pl>
Cc: Schmitt Thierry <thierry_schmitt@yahoo.com>; grassuser@grass.itc.it
Sent: Tuesday, March 20, 2007 10:16:53 AM
Subject: Re: [GRASS-user] mfilter

Jaros-Bław Jasiewicz wrote:-A

> I do wonder if mfilter can perfom filtering on float raster, ie
> providing results as raster. My recent use of r.mfilter led me to
> the contrary (i.e output is integer also input was raster). I am
> wrong somewhere?

well, not
The only solution is to multipy orginal map before filtering, and divide
it after

but... it is possible to change the r.mfilter to output fp maps? Is I
read source code the results is fp and next is rounded to near integer.
Maybe removing this part will be enough (but I'm not sure, I'm not
skilled enough in grass programming)

There isn't any fundamental reason why r.mfilter cannot be changed to
create FP maps.

Apart from allocating FCELL/DCELL buffers, certain functions need to
be changed, e.g.:

    G_open_cell_new -> G_open_fp_cell_new
    G_get_map_row -> G_get_d_raster_row

Also, the code would need to check for and handle null values; the old
G_get_map_row() interface silently converts nulls to zeroes.

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

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Schmitt Thierry wrote:

Am I wrong to think that r.neighbors and r.mfilter, for a 3x3 window
for example, should give me the same output.

Certain r.neighbours operations (specifically, sum and mean) can be
implemented using r.mfilter.

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