NCSU GIS/MEA582:
Geospatial Modeling and Analysis

This is an unmaintained course material, please see current material at:

Spatial interpolation and approximation I: methods

Resources:

Start GRASS GIS

Start GRASS - click on GRASS icon or type
grass70

In startup pannel set GIS Data Directory to path to datasets, for example on MS Windows, C:\Users\myname\grassdata.
For Project location select nc_spm_08_grass7 (North Carolina, State Plane, meters) and for Accessible mapset create a new mapset (called e.g. HW_interpolation_1).
Click Start GRASS.

Compute Voronoi polygons

Display the polygons with centroids.
Find the column name where z is stored and convert the polygons to raster.
Compute aspect to evaluate the surface geometry.
g.region rural_1m -p

v.voronoi elev_lid792_randpts output=elev_vor
d.vect elev_vor size=1 -c type=area,centroid
v.info -c elev_vor
v.to.rast elev_vor output=elev_vor_1m attrcolumn=value use=attr
r.colors elev_vor_1m color=elevation
r.slope.aspect elev_vor_1m aspect=asp_vor_1m

Display the resulting elevation map and aspect map.


d.rast elev_vor_1m
d.rast asp_vor_1m
d.vect elev_lid792_randpts size=1 color=red
d.out.file elev_voronoi

Optionally, you can view it in 3D perspective (switch off all layers except for elev_vor_1m and switch to 3D view).

Interpolation using IDW

Set region and resolution, find a column name where z is stored.
Interpolate DEM using IDW, check the result using aspect.
g.region rural_1m -p
v.info -c elev_lid792_randpts
v.surf.idw elev_lid792_randpts output=elev_idw_1m column=value
r.colors elev_idw_1m color=elevation
r.slope.aspect elev_idw_1m aspect=asp_idw_1m

d.rast elev_idw_1m
d.rast asp_idw_1m
d.vect elev_lid792_randpts size=2 color=red
d.out.file elev_idw

Design experiment that elucidates the impact of IDW parameters on the surface, focus on the impact of:

  • exponent e.g., power=0.5, 1, 5 (2 is the default)
  • number of neighboring points e.g., npoint=1, 5, 20, 60 (12 is the default)
Include selected images (e.g. hillshade or aspect) and relevant stats (e.g., mean, min, max from r.univar, histogram) that highlight the differences in the resulting surfaces into your report.

Check the surface interpolated with default parameters using 3D view.
Do not forget to switch off everything except for the interpolated elevations and set fine resolution to 1.
You can use constant color for the surface to highlight its structure.
Save an image for your report.

Compute DEM from contours

Compute DEM from contours using linear interpolation between isolines:
g.region rural_1m -p
v.to.rast elev_lid792_cont1m output=el_lid792_cont1m attrcolumn=level use=attr
r.surf.contour el_lid792_cont1m output=el_rcont
r.colors el_rcont color=elevation

Check the result using a 2D aspect map or view el_rcont in 3D.
In 3D set view from SE and light from NW to reveal subtle geometry.

r.slope.aspect el_rcont aspect=asp_rcont
d.rast el_rcont
d.rast asp_rcont
d.vect elev_lid792_cont1m col=white
d.out.file asp_rcont

Optional: create TIN model

Convert z-value stored as attribute "value" to z-coordinate.
Compute TIN and visualize it as 3D vector data:
Keep only "level90", "elev_idw_1m" and "elev_rand_tin" switched on.
For "elev_rand_tin" > Properties under Tab Selection switch off everything except for boundary.
Switch the view from 2D to 3D and remove elev_idw_1m.
v.to.3d elev_lid792_randpts output=elev_lid792_randpts3d column=value
v.delaunay elev_lid792_randpts3d output=elev_rand_tin
r.mapcalc "level90 = 90"