[GRASS-user] integration of sample.c algorithms into r.resample

Glynn Clements glynn at gclements.plus.com
Mon Aug 14 22:09:54 EDT 2006


Dylan Beaudette wrote:

> > > Whilst it would be possible to forcibly convert a CELL result to
> > > FCELL/DCELL with r.mapcalc in cases where that was required, it might
> > > not necessarily be obvious that a conversion is necessary until the
> > > first time you actually use method=nearest and end up having to figure
> > > out what happened.
> >
> > That's right. But there is one situation when the output *will* be CELL
> > for sure - if the input is CELL and method=nearest. Maybe your resample
> > module could take that into account?
> >
> > Other combinations are indeed hard to predict, as the most appropriate
> > output datatype will also depend on the combinations of output region
> > extent and input/output cell size and shape. So I guess defaulting to
> > DCELL is very good idea.
> 
> I agree with Maciek, in all cases but one defaulting to DCELL seems
> like a good idea. However, it might be overly confusing / complicated
> when an input map and NN interpolation produce a DCELL map. However, I
> found that truncating the DCELL to CELL values worked perfectly well.

Er, no. What *would* be confusing is having one specific case behave
differently to every other case.

Just because you *can* make method=nearest behave differently to all
of the other methods, that doesn't mean that you should.

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




More information about the grass-user mailing list