[GRASS-dev] v.surf.idw: a improvement

Hi Jorge,

I am always in favour of more interpolation methods,
but could you explain a little more about the advantage
of your weight term versus that of classical IDW?

A bit of web searching for "Interpolation Distance Weight" or
"Exponential Interpolation" (i.e. related to GIS and spatial interpolation).
did not produce anything meaningful for me.

Could you point me to some literature where I can find more
information on this?

Please see also my comments/questions below.

Thanks,

Ben

----- "E. Jorge Tizado" <ejtizado@ono.com> wrote:

Hi

A few lines permit add a new type of interpolation in v.surf.idw, the

exponential interpolation similar to "Geographically Weighted
Regression":

IDW is already a geographically weighted method, is it not?
And it also uses an exponential weight, so why would your version
be more similar to a regression model? Or do you mean that the
weight term is more similar to that used by GWR?

weigth = exp( - distance^2 / bandwidth^2)

So do I understand right that the weight gets smaller
as the bandwidth gets larger (given constant distance)?

I attach the diff files, the core is

for (n = 0; n < nsearch; n++)
{
  d = exp( - list[n].dist / bw );

Is list[n].dist already the squared distance?
And bw the squared bandwidth?

  sum1 += list[n].z * d;
  sum2 += d;
}

P.S. idw = interpolation distance weight, better than inverse distance
weight
to future more type of interpolations

--
E. Jorge Tizado

_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

------
Files attached to this email may be in ISO 26300 format (OASIS Open Document Format). If you have difficulty opening them, please visit http://iso26300.info for more information.

Hi Benjamin,

I am always in favour of more interpolation methods,
but could you explain a little more about the advantage
of your weight term versus that of classical IDW?

The only advantage is avoid the classic circular spot (attach idw.pow.jpg).
The IDW use a weight = 1/d^2, (Hyperbolic) with infinite value when d -> 0.
This result in a circular pattern, with other interpolation method it is
possible obtain a weight average of the points with d near zero (the
particular point has not the original value, good for robust estimation).

If weigth = exp( - distance^2 / bandwidth^2) Then, when d->0 weigth -> 1, no
infinite as in IDW

This is only a proposal to discuss new interpolation methods more interesting
than inverse squared distance.

A bit of web searching for "Interpolation Distance Weight" or
"Exponential Interpolation" (i.e. related to GIS and spatial
interpolation). did not produce anything meaningful for me.

The idea is from Geographically Weighted Regression

Could you point me to some literature where I can find more
information on this?

The manual of the SPGWR package of R give you some standard weights functions
(http://cran.r-project.org/web/packages/spgwr/index.html).
The 'exponential' proposed is in the gwr.gauss definition.

I'm testing others.

IDW is already a geographically weighted method, is it not?
And it also uses an exponential weight, so why would your version
be more similar to a regression model? Or do you mean that the
weight term is more similar to that used by GWR?

Of course, but it is not the unique geographically weighted method.
Geographically Weighted Regression is complex to implement in GRASS but it is
possible in R with the package spgwr.

So do I understand right that the weight gets smaller
as the bandwidth gets larger (given constant distance)?

Yes. Now, no default bandwith distance. Very lower values result in single
points (perhaps fill with global average?), lower values is similar a voronoi
triangulation (attach idw.baw1.jpg), high values result a smooth
interpolation (attach idw.baw2), very high values is a weighted average.

Is list[n].dist already the squared distance?
And bw the squared bandwidth?

Yes, see line: list[i].dist = dy * dy + dx * dx; of the original IDW.
As power param is by default 2.0 the normal interpolation of IDW is by 1/d^4

BW is also squared ( bw = atof( parm.bandw->answer ); bw = bw * bw; )

--
E. Jorge Tizado

(attachments)

idw_baw1.jpg
idw_baw2.jpg
idw_pow.jpg