[GRASS-user] r.resamp observations

Glynn Clements glynn at gclements.plus.com
Wed Dec 20 15:00:53 EST 2006


Hamish wrote:

> inconsistency:
> r.resamp.interp propagates nulls by default
>   # shrinks map

This is to be expected. Filling nulls by extrapolation would require a
radically different approach. Use r.fillnulls first.

> r.resamp.stats  doesn't propagate nulls by default (-n flag)
>   # grows map (maybe just an artifact of southward bug? [see below])

The default is to compute the aggregate over all non-null cells.

The main reason for the inconsistency is that ignoring nulls is
trivial for an aggregate but not possible for an algebraic expression
over a fixed set of values (instead, you have to specifically compute
substitute values through e.g. extrapolation).

> r.resamp.interp method=bilinear and bicubic will shrink the map when
> it sees a null (which makes sense). This means that it is not much use
> to folks who need info at the edges. (unless using some trick like
> r.patch'ing the edges back in from another method :-/)

This can't be helped. An interpolate between a known value and an
unknown value is itself an unknown value.

> bug:
> r.resamp.stats seems to shift the data southward by ~ 1 cell vs.
> r.resamp.interp, r.resamp.rst, and g.region+r.mapcalc methods.

Is this with a recent CVS copy? There was a bug which resulted in a
south-west shift of 0.5 map units, which was fixed on 2006/12/07.

Other than that, can you provide exact regions?

> .. and finally: at 100m,200m,+ resolutions there seems to be a northward
> bias in g.region+r.mapcalc method vs. resamp.rst and resamp.interp/bicubic.
> ?

The exact region settings, both bounds and resolution, are necessary
in order to try to reproduce these results.

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




More information about the grass-user mailing list