Interpolasi Spatial Statistics...Praktikum 5 | Statistika Spasial [email protected] Outline...
Transcript of Interpolasi Spatial Statistics...Praktikum 5 | Statistika Spasial [email protected] Outline...
![Page 2: Interpolasi Spatial Statistics...Praktikum 5 | Statistika Spasial rahmaanisa@apps.ipb.ac.id Outline •Trend surface •Thiesen Polygon •Inverse Weight Distance General list of techniques](https://reader030.fdocuments.us/reader030/viewer/2022021512/5af8adb97f8b9a19548bb3f4/html5/thumbnails/2.jpg)
Outline
• Trend surface
• Thiesen Polygon
• Inverse Weight Distance
![Page 3: Interpolasi Spatial Statistics...Praktikum 5 | Statistika Spasial rahmaanisa@apps.ipb.ac.id Outline •Trend surface •Thiesen Polygon •Inverse Weight Distance General list of techniques](https://reader030.fdocuments.us/reader030/viewer/2022021512/5af8adb97f8b9a19548bb3f4/html5/thumbnails/3.jpg)
![Page 4: Interpolasi Spatial Statistics...Praktikum 5 | Statistika Spasial rahmaanisa@apps.ipb.ac.id Outline •Trend surface •Thiesen Polygon •Inverse Weight Distance General list of techniques](https://reader030.fdocuments.us/reader030/viewer/2022021512/5af8adb97f8b9a19548bb3f4/html5/thumbnails/4.jpg)
![Page 5: Interpolasi Spatial Statistics...Praktikum 5 | Statistika Spasial rahmaanisa@apps.ipb.ac.id Outline •Trend surface •Thiesen Polygon •Inverse Weight Distance General list of techniques](https://reader030.fdocuments.us/reader030/viewer/2022021512/5af8adb97f8b9a19548bb3f4/html5/thumbnails/5.jpg)
General list of techniques(points)
• trend surface - a global interpolator which calculates a best overall surface fit
• IDW - inverse distance weighting
• loess – local weighted smoothing regression (weighted quadratic least squares regression)
• spline - mathematical piecewise curve fitting
• Kriging - using geostatistical techniques
![Page 6: Interpolasi Spatial Statistics...Praktikum 5 | Statistika Spasial rahmaanisa@apps.ipb.ac.id Outline •Trend surface •Thiesen Polygon •Inverse Weight Distance General list of techniques](https://reader030.fdocuments.us/reader030/viewer/2022021512/5af8adb97f8b9a19548bb3f4/html5/thumbnails/6.jpg)
Other procedures
• Thiessen or Voronoi tessellation – area divided into regions around the sample data points where every pixel or area in the region is assigned to the data point which is the closest
• TIN - sample data points become vertices of a set of triangular facets covering the study area
![Page 7: Interpolasi Spatial Statistics...Praktikum 5 | Statistika Spasial rahmaanisa@apps.ipb.ac.id Outline •Trend surface •Thiesen Polygon •Inverse Weight Distance General list of techniques](https://reader030.fdocuments.us/reader030/viewer/2022021512/5af8adb97f8b9a19548bb3f4/html5/thumbnails/7.jpg)
![Page 8: Interpolasi Spatial Statistics...Praktikum 5 | Statistika Spasial rahmaanisa@apps.ipb.ac.id Outline •Trend surface •Thiesen Polygon •Inverse Weight Distance General list of techniques](https://reader030.fdocuments.us/reader030/viewer/2022021512/5af8adb97f8b9a19548bb3f4/html5/thumbnails/8.jpg)
![Page 9: Interpolasi Spatial Statistics...Praktikum 5 | Statistika Spasial rahmaanisa@apps.ipb.ac.id Outline •Trend surface •Thiesen Polygon •Inverse Weight Distance General list of techniques](https://reader030.fdocuments.us/reader030/viewer/2022021512/5af8adb97f8b9a19548bb3f4/html5/thumbnails/9.jpg)
Topo Data SetSpatial Topographic Data
Description: The topo data frame has 52 rows and 3 columns, oftopographic heights within a 310 feet square.
This data frame contains the following columns:
x : x coordinates (units of 50 feet)
y : y coordinates (units of 50 feet)
z : heights (feet)
Source: Davis, J.C. (1973) Statistics and Data Analysis in Geology. Wiley.
![Page 10: Interpolasi Spatial Statistics...Praktikum 5 | Statistika Spasial rahmaanisa@apps.ipb.ac.id Outline •Trend surface •Thiesen Polygon •Inverse Weight Distance General list of techniques](https://reader030.fdocuments.us/reader030/viewer/2022021512/5af8adb97f8b9a19548bb3f4/html5/thumbnails/10.jpg)
Trend surface in gstat
library(MASS)
library(raster)
library(gstat)
library(sp)
data(topo)
![Page 11: Interpolasi Spatial Statistics...Praktikum 5 | Statistika Spasial rahmaanisa@apps.ipb.ac.id Outline •Trend surface •Thiesen Polygon •Inverse Weight Distance General list of techniques](https://reader030.fdocuments.us/reader030/viewer/2022021512/5af8adb97f8b9a19548bb3f4/html5/thumbnails/11.jpg)
coordinates(topo) <- ~ x+y
plot(topo)
![Page 12: Interpolasi Spatial Statistics...Praktikum 5 | Statistika Spasial rahmaanisa@apps.ipb.ac.id Outline •Trend surface •Thiesen Polygon •Inverse Weight Distance General list of techniques](https://reader030.fdocuments.us/reader030/viewer/2022021512/5af8adb97f8b9a19548bb3f4/html5/thumbnails/12.jpg)
x=seq(0,6.3, by=0.1);y=seq(0,6.3, by=0.1)
topo.grid <- expand.grid(x=x,y=y)
gridded(topo.grid) <- ~x+y
plot(topo.grid)
![Page 13: Interpolasi Spatial Statistics...Praktikum 5 | Statistika Spasial rahmaanisa@apps.ipb.ac.id Outline •Trend surface •Thiesen Polygon •Inverse Weight Distance General list of techniques](https://reader030.fdocuments.us/reader030/viewer/2022021512/5af8adb97f8b9a19548bb3f4/html5/thumbnails/13.jpg)
1st-order trend surfacex <- gstat(formula=topo$z ~ 1, data=topo, degree=1)
kt <- predict(x, newdata=topo.grid)
spplot(kt[1], contour=TRUE,main="topo trend surface (1)-gstat")
![Page 14: Interpolasi Spatial Statistics...Praktikum 5 | Statistika Spasial rahmaanisa@apps.ipb.ac.id Outline •Trend surface •Thiesen Polygon •Inverse Weight Distance General list of techniques](https://reader030.fdocuments.us/reader030/viewer/2022021512/5af8adb97f8b9a19548bb3f4/html5/thumbnails/14.jpg)
2nd order trend surfacex <- gstat(formula=topo$z ~ 1, data=topo, degree=2)
kt2 <- predict(x, newdata=topo.grid)
p1 <- spplot( kt2[1], contour=TRUE, main="topo trend surface (2)-
gstat",sp.layout=list(list("sp.points", topo@coords, pch=19,
col=2)))
p1
![Page 15: Interpolasi Spatial Statistics...Praktikum 5 | Statistika Spasial rahmaanisa@apps.ipb.ac.id Outline •Trend surface •Thiesen Polygon •Inverse Weight Distance General list of techniques](https://reader030.fdocuments.us/reader030/viewer/2022021512/5af8adb97f8b9a19548bb3f4/html5/thumbnails/15.jpg)
![Page 16: Interpolasi Spatial Statistics...Praktikum 5 | Statistika Spasial rahmaanisa@apps.ipb.ac.id Outline •Trend surface •Thiesen Polygon •Inverse Weight Distance General list of techniques](https://reader030.fdocuments.us/reader030/viewer/2022021512/5af8adb97f8b9a19548bb3f4/html5/thumbnails/16.jpg)
Inverse Distance Weighting
• Points closer to interpolation point should have more influence
• The technique estimates the Z value at a point by weighting the influence of nearby data point according to their distance from the interpolation point.
• An exact method for topographic surfaces
• Fast
• Simple to understand and control
![Page 17: Interpolasi Spatial Statistics...Praktikum 5 | Statistika Spasial rahmaanisa@apps.ipb.ac.id Outline •Trend surface •Thiesen Polygon •Inverse Weight Distance General list of techniques](https://reader030.fdocuments.us/reader030/viewer/2022021512/5af8adb97f8b9a19548bb3f4/html5/thumbnails/17.jpg)
IDW on Topo data set
kid <- krige(topo$z ~ 1, topo, topo.grid, NULL)
spplot(kid["var1.pred"], main = "TopIDW",contour=TRUE,
sp.layout=list(list("sp.points", topo@coords, pch=19, col=2)))
![Page 18: Interpolasi Spatial Statistics...Praktikum 5 | Statistika Spasial rahmaanisa@apps.ipb.ac.id Outline •Trend surface •Thiesen Polygon •Inverse Weight Distance General list of techniques](https://reader030.fdocuments.us/reader030/viewer/2022021512/5af8adb97f8b9a19548bb3f4/html5/thumbnails/18.jpg)
Thiessen Polygons
![Page 19: Interpolasi Spatial Statistics...Praktikum 5 | Statistika Spasial rahmaanisa@apps.ipb.ac.id Outline •Trend surface •Thiesen Polygon •Inverse Weight Distance General list of techniques](https://reader030.fdocuments.us/reader030/viewer/2022021512/5af8adb97f8b9a19548bb3f4/html5/thumbnails/19.jpg)
Meuse River Data Set
Description: This data set gives locations and topsoil heavy metalconcentrations, along with a number of soil and landscape variablesat theobservation locations, collected in a flood plain of the river Meuse, near thevillage of Stein (NL). Heavy metal concentrations are from compositesamples of an area of approximately 15 m x 15 m.
This data frame contains the following columns:
x : a numeric vector; Easting (m) in Rijksdriehoek (RDH) (Netherlandstopographical) map coordinates
y : a numeric vector; Northing (m) in RDH coordinates
zinc : topsoil zinc concentration, mg kg-1 soil ("ppm")
![Page 20: Interpolasi Spatial Statistics...Praktikum 5 | Statistika Spasial rahmaanisa@apps.ipb.ac.id Outline •Trend surface •Thiesen Polygon •Inverse Weight Distance General list of techniques](https://reader030.fdocuments.us/reader030/viewer/2022021512/5af8adb97f8b9a19548bb3f4/html5/thumbnails/20.jpg)
Meuse Data Setlibrary(sp)
data(meuse)
names(meuse)
summary(meuse)
hist(meuse$zinc)
plot(meuse$x,meuse$y,asp=1)
![Page 21: Interpolasi Spatial Statistics...Praktikum 5 | Statistika Spasial rahmaanisa@apps.ipb.ac.id Outline •Trend surface •Thiesen Polygon •Inverse Weight Distance General list of techniques](https://reader030.fdocuments.us/reader030/viewer/2022021512/5af8adb97f8b9a19548bb3f4/html5/thumbnails/21.jpg)
coordinates(meuse) = ~x + y # convert data to spatial points data frame
class(meuse)[1] "SpatialPointsDataFrame"
attr(,"package")
[1] "sp"
data(meuse.grid)# this is gridded data for the meuse data set
str(meuse.grid)'data.frame': 3103 obs. of 7 variables:
$ x : num 181180 181140 181180 181220 181100 ...
$ y : num 333740 333700 333700 333700 333660 ...
$ part.a: num 1 1 1 1 1 1 1 1 1 1 ...
$ part.b: num 0 0 0 0 0 0 0 0 0 0 ...
$ dist : num 0 0 0.0122 0.0435 0 ...
$ soil : Factor w/ 3 levels "1","2","3": 1 1 1 1 1 1 1 1 1 1 ...
$ ffreq : Factor w/ 3 levels "1","2","3": 1 1 1 1 1 1 1 1 1 1 ...
coordinates(meuse.grid) = ~x + y # converts to spatial class
gridded(meuse.grid) <- TRUE
![Page 22: Interpolasi Spatial Statistics...Praktikum 5 | Statistika Spasial rahmaanisa@apps.ipb.ac.id Outline •Trend surface •Thiesen Polygon •Inverse Weight Distance General list of techniques](https://reader030.fdocuments.us/reader030/viewer/2022021512/5af8adb97f8b9a19548bb3f4/html5/thumbnails/22.jpg)
Thiessen Polygons
zn.tp = krige(log(zinc) ~ 1, meuse, meuse.grid, nmax = 1)
#for this search, the neighborhood is set to nmax=1
image(zn.tp["var1.pred"])
points(meuse, pch = "+", cex = 0.65)
cc = coordinates(meuse)
![Page 23: Interpolasi Spatial Statistics...Praktikum 5 | Statistika Spasial rahmaanisa@apps.ipb.ac.id Outline •Trend surface •Thiesen Polygon •Inverse Weight Distance General list of techniques](https://reader030.fdocuments.us/reader030/viewer/2022021512/5af8adb97f8b9a19548bb3f4/html5/thumbnails/23.jpg)
Thiessen Polygons
library(tripack)
plot(voronoi.mosaic(cc[, 1], cc[, 2]), do.points = FALSE, add = TRUE)
title("Thiessen (or Voronoi) polygon interpolation of log(zinc)")
![Page 24: Interpolasi Spatial Statistics...Praktikum 5 | Statistika Spasial rahmaanisa@apps.ipb.ac.id Outline •Trend surface •Thiesen Polygon •Inverse Weight Distance General list of techniques](https://reader030.fdocuments.us/reader030/viewer/2022021512/5af8adb97f8b9a19548bb3f4/html5/thumbnails/24.jpg)
Spline
• Surface created with Spline interpolation• Passes through each sample point
• May exceed the value range of the sample point set
![Page 25: Interpolasi Spatial Statistics...Praktikum 5 | Statistika Spasial rahmaanisa@apps.ipb.ac.id Outline •Trend surface •Thiesen Polygon •Inverse Weight Distance General list of techniques](https://reader030.fdocuments.us/reader030/viewer/2022021512/5af8adb97f8b9a19548bb3f4/html5/thumbnails/25.jpg)
Spline Interpolation
library(akima)
data(meuse)
meuse.zinc <- data.frame(cbind(meuse$x,
meuse$y,meuse$zinc))
par(mfcol=c(1,1))
meuse.akim <- interp(meuse.zinc$X1, meuse.zinc$X2, meuse.zinc$X3)
image(meuse.akim,,xlab="", ylab="",asp=1)
contour(meuse.akim,add=TRUE,, levels = seq(100,2000,200))
title(main="Bilinear Interpolation (Akima - default)")
points(meuse.zinc)
![Page 26: Interpolasi Spatial Statistics...Praktikum 5 | Statistika Spasial rahmaanisa@apps.ipb.ac.id Outline •Trend surface •Thiesen Polygon •Inverse Weight Distance General list of techniques](https://reader030.fdocuments.us/reader030/viewer/2022021512/5af8adb97f8b9a19548bb3f4/html5/thumbnails/26.jpg)
![Page 27: Interpolasi Spatial Statistics...Praktikum 5 | Statistika Spasial rahmaanisa@apps.ipb.ac.id Outline •Trend surface •Thiesen Polygon •Inverse Weight Distance General list of techniques](https://reader030.fdocuments.us/reader030/viewer/2022021512/5af8adb97f8b9a19548bb3f4/html5/thumbnails/27.jpg)
Choosing the Right Interpolation
• The quality of sample point set can affect choice of interpolation method as well. If the sample points are poorly distributed or there are few of them, the surface might not represent the
actual terrain very well. If we have too few sample points, add more sample points in areas
where the terrain changes abruptly or frequently, then try using Kriging.
• The real-world knowledge of the subject matter will initially affect which interpolation method to use. If it is know that some of the features in surface exceed the z value, for example, and that IDW will result in a surface that does not exceed the highest or lowest z value in the sample point
set, choose the Spline method.
• If we know that the splined surface might end up with features that we know don’t exist because Spline interpolation doesn’t work well with sample points that are close together and have
extreme differences in value, you might decide to try IDW
![Page 28: Interpolasi Spatial Statistics...Praktikum 5 | Statistika Spasial rahmaanisa@apps.ipb.ac.id Outline •Trend surface •Thiesen Polygon •Inverse Weight Distance General list of techniques](https://reader030.fdocuments.us/reader030/viewer/2022021512/5af8adb97f8b9a19548bb3f4/html5/thumbnails/28.jpg)
References
1. Anonymous. 2017. Interpolation in R. https://mgimond.github.io/Spatial/interpolation-in-r.html [17 Okt 2017]
2. [gisresource]. 2013. Choosing the Right Interpolation Method. https://www.gisresources.com/choosing-the-right-interpolation-method_2/ [17 Okt 2017)
3. Lewis, J. Spatial Interpolation: Methods for Extending Information on Spatial Data Fields.
4. Lewis, J. 2013. GEOSTAT13 Tutorial: Spatial Interpolation with R.
5. Sang. 2006. Lecture Notes: Spatial Interpolation. http://sbs.mnsu.edu/geography/people/sang/LECTURE8_SPATIAL_INTERPOLATION.pdf [17 Okt2017]
6. Pustaka lain yang relevan.