November 2018
Beginner to intermediate
354 pages
6h 59m
English
We'll then convert this raster data into point data and get the nearest neighbor for each location and assign values to an unobserved point; the values will be those of the nearest neighboring points. This is called nearest-neighbor interpolation.
Let's load the DEM file first:
library(raster)dem = raster("F:/Hands-on-Geospatial-Analysis-Using-R-and-QGIS/Chapter 07/Data/dem.tif") plot(dem, main="Elevation")
Now have a look at the coordinate reference system of this raster screenshot:

dem@crs
We get the following result:
We'll aggregate 4 x 4 cells to one cell for computational purpose (to get more speed):
Read now
Unlock full access