reducing grid size of elevation data

Jim Aanstoos (919) 541-6890 AANSTOOS%LOUIE at rcc.rti.org
Thu Jul 29 12:23:28 EDT 1993


>Hmmm, I was under the impression that GRASS automatically resamples
>the data to match the current region settings and then resamples
>again to match the display device.  So for display purposes you
>shouldn't need to explicitly resample your data layer if
>your current region is set to 10m resolution - and you've
>d.erase'd :-)  As to what resampling technique is used,
>I've found references to nearest neighbor resampling in the
>manuals, but it's not entirely clear to me if this is the one
>and only technique used.  I hope someone can clarify this...

I'm pretty sure that grass uses only nearsest neighbor (NN) resampling,
especially for the implicit resampling that occurs when displaying
data or combining layers.  You really wouldn't want anything else
to happen without explicitly asking for it, since it is meaningless
to do things like smooth or average raster values that are really
category indices.  The reason you would want to explicitly
resample your data, then, is to get the effect of something other
than NN-- such as smoothing.

>Which raises an issue I've been wondering about.  If my
>understanding is correct, since most of the GRASS routines observe
>the region settings, unless all one's data is identical with respect
>to the region settings, resampling is being done extensively.
>Is this true?

Quite true-- implicit resampling will occur with most grass programs when
regions are not aligned and/or at different resolutions (as the man pages
are careful to point out in many cases).  One of the pitfalls of a raster
GIS; but quite manageable by appropriate region specification.

>If so, what kinds of error are introduced and how does one
>track the error associated with combining, mapcalcing or
>otherwise analyzing multiple layers at different resolutions?
>If this isn't true then how do r.combine and r.mapcalc process
>raster layers with different resolutions?
>
>Andrew Hertz
>hertz at geog.psu.edu
>

I know of no formal error tracking method for this type of resampling
error --  But some things to keep in mind:
There are 2 different aspects to the issue of NN resampling error--
errors due to misalignment of regions, and errors due to differing
resolutions of regions.  If your resolutions are the same, but the
regions in question are not aligned the same (ie grid cell centers
don't fall at the same locations; note this does not require regions
to be IDENTICAL, just related by an integer multiple of the cell
size), then you will get location errors of up to 1/2 a cell size
worst case, and these errors will accumulate with each combination
of misaligned grids.  If the RESOLUTIONS are different, this does
not necessarily cause any location errors because the grids can
still be aligned if the larger cells are integer multiples of the
smaller cell size. When this is not the case, you are subject to
the same type of sampling location errors mentioned above.

To minimize problems due to resampling, try to keep your regions
aligned with each other when possible.  When not possible, try
using higher resolutions (ie, smaller cell sizes) for
intermediate layers and then resample the output to the desired
final resolution.  Of course, this increases computational costs.

            /\
      jim  /--\
          /    \ 
______________________________________________________________________
Jim Aanstoos                      Internet: aanstoos%louie at rcc.rti.org
                                         or aanstoos%louie at rti.rti.org
Research Triangle Institute                                           
PO Box 12194                                       Phone: 919-541-6890
Research Triangle Park, NC 27709-2194                Fax: 919-541-6515
----------------------------------------------------------------------



More information about the grass-user mailing list