You are on page 1of 17

GGI 3103: Spatial Analysis

-
Interpolation

1
Interpolation and extrapolation

• Interpolation serves to calculate values “as if observed” by means


of values that were truly observed. For this a dependency between
both is established.
• Interpolation calculates values for locations somehow “between”
the data points.
• In other locations the same principles convert to extrapolation
• Extrapolation can be expressed as an extension of interpolation to
locations outside of the current spatial domain.

2
Interpolation
• Interpolation can be forced to meet the data points. Then it is
considered here as Non-Filtering or sometimes as being Exact. This
can be misleading if understood as “precise”.
• In contrast, when the data points are measured quantities it makes
sense to give corrections to them. Such interpolation will not
always meet the data points. Here we use the term Filtering.
• Accordingly this is also named “non-exact”. The results of filtering
interpolations will be determined by several data points and may
be more precise than results of a non-filtering approach.

3
Linear Interpolation
• Determine values s0 for individual locations t0

• Where the ratio a


represents gradient and
• a = tan α is the gradient
angle

4
Linear Interpolation
• A standard example with
more data sets
• The influence of si values on
s0 is limited to its 2 direct
neighbors
• Linear interpolation is Local
because not all observations
are needed to calculate a
single s0.

5
Linear Interpolation

6
Linear Interpolation: Example
t = [ 1 3 5 7 8 10 12 15 ];
s = [ 3 6 3 2 1 1 1 6 ];

a) Find s0 for location t0 = 6.5


b) Determine the weights for the surrounding points

7
General polynomial functions
- Any polynomial used for interpolation would be

• For a polynomial degree m= n.


• the values a0….am are called coefficients. They are assumed to be constant but
unknown.
• t0 is called parameter or leading variable.
• t0 represents any Location of Interest for interpolation.
• s0 is interpolation value for the location of interest or dependent variable.
• for n=0 the function is called constant
• for n=1 it is called linear
• for n=2 it is called quadratic
• for n=3 it is called cubic (quartic, quantic…)
• Polynomial functions can be applied for the whole range of data (as global
polynomial) or in intervals (as splines). In both cases the coefficients have to be
determined.
8
Nearest Neighbor Interpolation
• NN selects the s value of the nearest data point.
• Nearest data point is the one (ti,si) having minimal distance to the point of
interest.
• Nearest neighbor interpolation. Vertical bars indicate locations where nearest
data point changes. In consequence s0 often leaps.

• Nearest Neighbor
interpolation is local because
the result is only affected by
one single data point.
• Moving through the data
leaps appear (artefacts).
• In such locations the function
will be defined by either left
or right “next” point.

9
Filtering Curve Interpolation
• If interpolation is not forced to pass through the data points the observed data
get corrections. Such interpolation is called filtering.
• Corrections depend on the data AND on functional and stochastical assumptions
about them.

• Observations get corrections vi.


• In the image, vi-1 and vi+1 have
positive values, vi is negative.
E.g. s(i-1)+v(i-1) is filtered observation
i-1.
• Interpolated value for t0 is s0.

10
Filtering Curve Interpolation: IDW
Inverse (Squared) Distance Weighting (IDW, ISDW)

• The stochastical model assigns adjustment weights to observations


where di is the distance from the location of interest

• With the distances di between


location of interest and data point I
we get:

• The adjustment weights are:

11
Filtering Curve Interpolation: IDW
Inverse Distance Weighting (IDW)

12
Filtering Curve Interpolation: IDW
Inverse squared Distance Weighting (ISDW)

13
Filtering Curve Interpolation: IDW
Inverse (Squared) Distance Weighting (IDW, ISDW)

• IDW and ISDW are widely used interpolation methods.


• They meet the data points and are non-filtering methods.
• Adjustment weights pi are calculated by distance. Nearby points
get higher pi weights and have more influence on the data.
• Remote data points can be practically neglected because they
have no numerical influence on the result.
• When we move towards a data point, the distance approximates
zero.
• Therefore adjustment weights pi for that point tend to infinity and
contribution weights wi tend to 1.

14
Filtering Curve Interpolation: IDW
Inverse (Squared) Distance Weighting (IDW, ISDW)

• To overcome the numerical problem of infinity the adjustment


weights can be selected as

• Usually ε values can be selected as small values like 0.000001 or


even smaller.
• ε must be big enough not to let infinity be calculated.
• It must be much smaller however than the smallest distance
between any two points.
• The IDW and ISDW are types of Moving Average interpolation.

15
IDW Interpolation for Standard example

t = [ 1 3 5 7 8 10 12 15 ];
s = [ 3 6 3 2 1 1 1 6 ];
IDW Interpolation for Standard example

t0= 6.5 eps= 0.000001


ti si di pi=1/di modif pi*si wi wi*si
1 3
3 6
5 3
7 2
8 1
10 1
12 1
15 6

sums:
16
check result: (=s0)
IDW Example

17

You might also like