[GRASSLIST:4426] Re: one column wide filtering

Glynn Clements glynn.clements at virgin.net
Thu Sep 5 12:26:57 EDT 2002


Thomas Dewez wrote:

> I would like to pass a one-column-wide and 51-rows-high maximum filter on
> a DEM. I found the maximum method in the r.neighbors command and the
> custom-size filter in the r.mfilter. How is it possible to obtain combine
> them?

It isn't possible to combine them.

r.mfilter is of no use here, as it only supports linear filters.

r.neighbors would be the right tool, but it currently only supports a
square neighbourhood. There isn't any inherent reason for this
restriction. It wouldn't be particularly difficult to change, either.

You *should* be able to do it with r.mapcalc, i.e.

	r.mapcalc 'output = max(input[-25],input[-24],input[-23],...)'

BUT: there might be some internal limitation which prevents this (I
don't think so, but I haven't actually tried it).

-- 
Glynn Clements <glynn.clements at virgin.net>



More information about the grass-user mailing list