This document presents the results of the interpolation laboratory carried out in the Methods in Spatial Analysis class at the University of Salzburg.

Introduction

According to Mitas & Mitasova (1999), the general formulation of the spatial interpolation problem can be defined as follows:

Given N values of a given phenomenon \(Z_j\) for \(j=0,1,2,...,N\) measured at discrete points \(r_j=(x_j^{[1]},x_j^{[2]},...,x_j^{[d]})\) for \(j=0,1,2,...,N\) N within a certain region of a d-dimensional space, find a d-variate continuous function \(F(r)\) which passes through the given points, that means, fulfils the condition:

\(F(r_j)=Z_j\) for \(j=0,1,2,...,N\)

Or in simpler words, find a function that is able to estimate unknown values at non-sampled positions, given a set of neighboring sampled values. In the following lines, different interpolation methods are tested over and compared.

The data

The data used consist of a climatological dataset from 2008 provided for the Croatian Meteorological and Hydrological Service, it includes temperature and precipitation observations. Although the sampling is not regular, one of the focuses of the analysis will be the behavior of different techniques in the borders of the country. The variable to model is the median temperature for 28 September 2008.

##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##    8.33   16.83   17.96   17.77   19.20   23.87       4

Performance Assessment

As suggested in Tiengrod, P., & Wongseree, W. (2013) for verify the accuracy of the estimation data I used leave-one-out method in this experiment. Leave-one-out is used N-1 examples for training and the remaining example for testing for each experiment. I base my conclusions on the RMSE metrics.

$RMSE=

Inverse Distance Weighing (IDW)

This is one of the simplest and most readily available methods. It is based on an assumption that the value at an unsampled point can be approximated as a weighted average of values at points within a certain cut-off distance, or from a given number m of the closest points (typically 10 to 30). Weights are usually inversely proportional to a power of distance (Burrough 1986).

To select a proper power \(p\) to be used in IDW method, graphical and statistical methods will be used. First we see the results of interpolations with different powers.

## tmap mode set to plotting
## stars object downsampled to 1000 by 1000 cells. See tm_shape manual (argument raster.downsample)
## stars object downsampled to 1000 by 1000 cells. See tm_shape manual (argument raster.downsample)
## stars object downsampled to 1000 by 1000 cells. See tm_shape manual (argument raster.downsample)
## stars object downsampled to 1000 by 1000 cells. See tm_shape manual (argument raster.downsample)
## stars object downsampled to 1000 by 1000 cells. See tm_shape manual (argument raster.downsample)
## stars object downsampled to 1000 by 1000 cells. See tm_shape manual (argument raster.downsample)

## tmap mode set to plotting

As we can see lower values of \(p\) increase de smoothness of the interpolated surface, too ow values may lead to biased results where no information is retrieved from the neighboring samples. On the other hand high values of \(p\) overtake the neighboring values and can produce false estimations. To asses the best power a cross-validation based on RSME is performed.

plot(power, rmses, type="l")

With this estimation we can determine that 2 is the power that minimizes the total RMSE between original and interpolated values.

Now we proceed to cross validate the model with LOOCV method.As suggested for the residuals, the bigger differences appear in those areas where the samples are isolated from other observed points, which occur often over the borders of the country, however it is no a generalized behavior and there are points in the center that also present some major error. With this approach we obtain a RMSE of 4.1, value which we will compare with other methods. Finally, due to the large differences between original values and interpolated results, this migth not be a suitable method of interpolation in this case.

## [1] 4.132835

Kriging

Kriging is based on a concept of random functions: the surface or volume is assumed to be one realization of a random function with a certain spatial covariance (Journel and Huijbregts 1978). For simplicity the background process of data preparation is not shown, after this we can assume the data is: isotropic, normal and has no trend. With this information we calculate an empirical variogram and then fit some semi-variogram models to it. The selected model is a classic variogram estimator with a Exponential model estimated by means of weighted least squares (no nested models are been considered).

With this information we calculate de kiging interpolation and get this results. The surface is smoother compared to IDW and it doesn’t present the bull eye effect in the sampled zones. Furthermore, we can asses the precision of the predictions with the variance map obtained from this interpolation method. The variances are below 2°, the best predictions are those closer to the sampled points, and the peak variances are presented in the zones where fewer samples exists, for example, but not exclusively, in borders as expected. For this method we obtain a RMSE of 2.04 trough LOCCV validation, proving it performed better than IDW.

## tmap mode set to plotting

## tmap mode set to plotting
risk.bins <-c(seq(8,24,2))
risk.pal <- colorBin( "Reds", bins=risk.bins,na.color = NA)


leaflet(data=croacia1) %>% addTiles()%>%addProviderTiles(providers$Stamen.Toner)%>%
  addCircleMarkers(lng = croacia1$lon, lat = croacia1$lat,color="black",radius = 1.5, stroke = FALSE, fillOpacity = 1)%>%
  addRasterImage(krig.map,colors = risk.pal) %>%addLegend(pal = risk.pal, values = values(krig.map),title = "Temp interpolation with IDW p=2")

Rreferences

Burrough, P. A. (1986). Principles of geographical information systems for land resources assessment. Clarendon.

Garnero, G., & Godone, D. (2013). Comparisons between different interpolation techniques. The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, 5, W3.

Journel, A. G., & Huijbregts, C. J. (1978). Mining geostatistics. vol. 600 Academic press.

Mitas, L., & Mitasova, H. (1999). Spatial interpolation. Geographical information systems: principles, techniques, management and applications, 1(2).

Tiengrod, P., & Wongseree, W. (2013, September). A comparison of spatial interpolation methods for surface temperature in Thailand. In 2013 International Computer Science and Engineering Conference (ICSEC) (pp. 174-178). IEEE.