+ All Categories
Home > Documents > Lloyd hw7 mea582f11 - files.transtutors.com · 2 Task This assignment's tasks were to interpolate...

Lloyd hw7 mea582f11 - files.transtutors.com · 2 Task This assignment's tasks were to interpolate...

Date post: 11-Nov-2018
Category:
Upload: nguyenkhue
View: 215 times
Download: 0 times
Share this document with a friend
19
1 John Lloyd MEA582 Fall 2011 Homework 7: Spatial interpolation and approximation: methods October 11, 2011 Contents Task ............................................................................................................................................................... 2 Approach ....................................................................................................................................................... 2 Results ........................................................................................................................................................... 2 GRASS ........................................................................................................................................................ 2 Computing Voronoi Polygons ............................................................................................................... 2 Interpolation using IDW ........................................................................................................................ 5 Experiment that elucidates the Impact of IDW Parameters ................................................................. 7 Computing DEM from Contours using Linear Interpolation ............................................................... 13 ESRI ArcMap ............................................................................................................................................ 15 Computing DEM based on Voronoi Polygons ..................................................................................... 15 Interpolate DEM using TIN .................................................................................................................. 17 Interpolate DEM using IDW ................................................................................................................ 18 Discussion ................................................................................................................................................... 19 Conclusion ................................................................................................................................................... 19
Transcript
Page 1: Lloyd hw7 mea582f11 - files.transtutors.com · 2 Task This assignment's tasks were to interpolate elevation surfaces using various approaches and understand the differences and problems

1  

John Lloyd 

MEA582 Fall 2011 

Homework 7: Spatial interpolation and approximation: methods   

October 11, 2011 

ContentsTask ............................................................................................................................................................... 2 

Approach ....................................................................................................................................................... 2 

Results ........................................................................................................................................................... 2 

GRASS ........................................................................................................................................................ 2 

Computing Voronoi Polygons ............................................................................................................... 2 

Interpolation using IDW ........................................................................................................................ 5 

Experiment that elucidates the Impact of IDW Parameters ................................................................. 7 

Computing DEM from Contours using Linear Interpolation ............................................................... 13 

ESRI ArcMap ............................................................................................................................................ 15 

Computing DEM based on Voronoi Polygons ..................................................................................... 15 

Interpolate DEM using TIN .................................................................................................................. 17 

Interpolate DEM using IDW ................................................................................................................ 18 

Discussion ................................................................................................................................................... 19 

Conclusion ................................................................................................................................................... 19 

 

 

 

Page 2: Lloyd hw7 mea582f11 - files.transtutors.com · 2 Task This assignment's tasks were to interpolate elevation surfaces using various approaches and understand the differences and problems

2  

TaskThis assignment's tasks were to interpolate elevation surfaces using various approaches and understand 

the differences and problems with each of the results. 

 

ApproachI started with a dataset of points containing x, y, and z (elevation) coordinates. I then created elevation 

rasters using Voronoi Polygons, Triangulated Irregular Networks (TIN), Linear Interpolation between 

Contours, and Inverse Distance Weighting (IDW). I used a hillshade raster to emphasize the differences 

in topology. I also viewed 3D representations of the rasters to further explore differences. 

Finally, I devised an experiment to show the effects of varying the IDW algorithm’s number of points and 

exponent parameters. The experiment varied one parameter at a time and then compared the rasters 

both visually and statistically. 

 

Results

GRASSI completed these tasks using GRASS GIS 6.4.2svn48509 (2011) on Windows7.  

 

ComputingVoronoiPolygonsI computed Voronoi polygons from a set of random elevation points using the v.voronoi tool. The 

attribute "value" associated with each polygon is the elevation of the point contained by the polygon. 

From the polygons I used the v.to.rast tool to create an elevation raster and the r.slope.aspect tool to 

create an aspect raster. The results are shown in Figure 1 Zoom in on portion of elev_vor showing 

polygons, Figure 2 elev_vor_1m elevation raster, and Figure 3 asp_vor_1m aspect raster.  

Figure 4 elev_voronoi with elevation, aspect, and points shows the resulting elevation map. 

An aspect raster created from an elevation raster derived from Voronoi Polygons is unusable. Because 

the entire polygon contains the same elevation value, the only points in the raster, where a slope exists 

are the borders of the polygons. Hence, the majority of the cells will contain the “no slope” value.   

Figure 5 Hole in Elevation Raster shows a hole in the elevation raster (and also the aspect raster but not 

shown). There appear to be points inside the hole and it looks like a polygon was created, but no cells 

were assigned the attribute values. This may be an indication of a bug. 

Figure 6 elev_vor_1m viewed in nviz shows the nviz view of Voronoi Polygon derived elevation raster. 

Page 3: Lloyd hw7 mea582f11 - files.transtutors.com · 2 Task This assignment's tasks were to interpolate elevation surfaces using various approaches and understand the differences and problems

3  

 

 

Figure 1 Zoom in on portion of elev_vor showing polygons 

 

 

Figure 2 elev_vor_1m elevation raster 

Page 4: Lloyd hw7 mea582f11 - files.transtutors.com · 2 Task This assignment's tasks were to interpolate elevation surfaces using various approaches and understand the differences and problems

4  

 

Figure 3 asp_vor_1m aspect raster   

 

Figure 4 elev_voronoi with elevation, aspect, and points 

Page 5: Lloyd hw7 mea582f11 - files.transtutors.com · 2 Task This assignment's tasks were to interpolate elevation surfaces using various approaches and understand the differences and problems

5  

 

Figure 5 Hole in Elevation Raster 

 

Figure 6 elev_vor_1m viewed in nviz 

 

InterpolationusingIDWI used the v.surf.idw tool to create an elevation raster using Inverse Distance Weighting (IDW) 

interpolation. Then, I used the tool r.slope.aspect to create an aspect raster from the elevation raster. 

The results are shown in Figure 7 elev_idw_1m elevation raster and Figure 8 asp_idw_1m aspect raster.  

Figure 9 elev_idw with elevation, aspect, and points and Figure 10 elev_idw_1m in nviz show the 

resulting elevation map. 

 

Page 6: Lloyd hw7 mea582f11 - files.transtutors.com · 2 Task This assignment's tasks were to interpolate elevation surfaces using various approaches and understand the differences and problems

6  

 

Figure 7 elev_idw_1m elevation raster 

 

 

Figure 8 asp_idw_1m aspect raster 

 

Page 7: Lloyd hw7 mea582f11 - files.transtutors.com · 2 Task This assignment's tasks were to interpolate elevation surfaces using various approaches and understand the differences and problems

7  

 

Figure 9 elev_idw with elevation, aspect, and points 

 

Figure 10 elev_idw_1m in nviz 

 

ExperimentthatelucidatestheImpactofIDWParametersI first used the g.region command to zoom in on a one portion of the map allowing me to see smaller 

differences in the rasters. I chose an area about 100m by 100m in the center of the map containing a 

slope (See Figure 11 Grey patch indicates area of experiment and Figure 12 The experiment area with 

default, p=2, npoint=12, parameters in nviz). Then, I reran the v.surf.idw command with the default 

parameters, exponent p=2 and neighbor points npoint=12, to create an elevation raster covering only 

my zoomed in area (Figure 13 Defaults p=2 np=12). 

Then, I created four more elevation rasters varying one of the parameters at a time (Figure 15 p=0.5 

npoint=12 to Figure 18 p=2 npoint=60). I created two rasters by varying the p value above and below the 

Page 8: Lloyd hw7 mea582f11 - files.transtutors.com · 2 Task This assignment's tasks were to interpolate elevation surfaces using various approaches and understand the differences and problems

8  

default; decreasing p to 0.5 and increasing p to 5, and I created two rasters by varying npoint parameter 

above and below the default; decreasing the npoint value to 5 and increasing npoint to 60. 

I can see that by decreasing p from 5 (Figure 16 p=5 npoint=12) to 0.5 (Figure 15 p=0.5 npoint=12) I got a 

smoother surface, which is as expected, since the farther points had a greater influence with the 

decreasing p value. The histogram in Figure 21 p=0.5 npoint=12 Histogram contains less spikes than the 

histogram in Figure 22 p=5 npoint=12 Histogram also indicating a smoother surface. Figure 27 nviz of 

p=0.5 npoint=12 and Figure 28 nviz of p=5 npoint=12 show the same surfaces in nviz. 

However, with my initial experiment it was difficult to see the influence of npoint, possibly because the 

default, p=2, caused the additional points that were farther away to have little influence. I reran the 

experiment with p=0.5 and varied the npoint from 5 to 60. This time I could see that increasing the 

npoint parameter to 60 caused the elevation to blur in some places but also caused spikes and holes at 

the extreme elevations as those points had less influence on the cells around them (Figure 20 p=0.5 

npoint=60). The histogram in Figure 26 p=0.5 npoint=60 Histogram is more bunched in the middle 

showing less influence of the extreme high and low elevations. Figure 29 nviz p=0.5 npoint=5 and Figure 

30 nviz p=0.5 npoint 60 show the same results in nviz. 

The results are shown in the figures below. 

 

Figure 11 Grey patch indicates area of experiment  

Figure 12 The experiment area with default, p=2, npoint=12, parameters in nviz  

 

 

Page 9: Lloyd hw7 mea582f11 - files.transtutors.com · 2 Task This assignment's tasks were to interpolate elevation surfaces using various approaches and understand the differences and problems

9  

 Figure 13 Defaults p=2 np=12 

 Figure 14 Defaults p=2 np=12 Histogram 

 

Figure 15 p=0.5 npoint=12  

 

Figure 16 p=5 npoint=12  

Figure 17 p=2 npoint=5  

 

Figure 18 p=2 npoint=60  

Page 10: Lloyd hw7 mea582f11 - files.transtutors.com · 2 Task This assignment's tasks were to interpolate elevation surfaces using various approaches and understand the differences and problems

10  

 

Figure 19 p=0.5 npoint=5 

 

Figure 20 p=0.5 npoint=60 

Figure 21 p=0.5 npoint=12 Histogram 

 

Figure 22 p=5 npoint=12 Histogram 

 

Figure 23 p=2 npoint=5Histogram 

 

Figure 24 p=2 npoint=60 Histogram 

Page 11: Lloyd hw7 mea582f11 - files.transtutors.com · 2 Task This assignment's tasks were to interpolate elevation surfaces using various approaches and understand the differences and problems

11  

 

Figure 25 p=0.5 npoint=5 Histogram 

 

Figure 26 p=0.5 npoint=60 Histogram 

Page 12: Lloyd hw7 mea582f11 - files.transtutors.com · 2 Task This assignment's tasks were to interpolate elevation surfaces using various approaches and understand the differences and problems

12  

 Figure 27 nviz of p=0.5 npoint=12   

Figure 28 nviz of p=5 npoint=12 

 Figure 29 nviz p=0.5 npoint=5  Figure 30 nviz p=0.5 npoint 60 

 

 

Page 13: Lloyd hw7 mea582f11 - files.transtutors.com · 2 Task This assignment's tasks were to interpolate elevation surfaces using various approaches and understand the differences and problems

13  

ComputingDEMfromContoursusingLinearInterpolationI first converted a vector line contour layer to a raster layer and, then, multiplied the cell (elevation) 

values by 100 as seen in Figure 31 el_lid792_cont1m_100 contours multiplied by 100. 

I used r.surf.contour to create elevation rasters from the contour rasters. The first raster (shown in 

Figure 32 el_rcont elevation raster) was created from the contours without multiplying the contour 

value. The second raster (shown in Figure 33 el_rcont_1 elevation raster) was created from a contour 

raster after multiplying the contour value by 100 then dividing the elevation raster by 100 using 

r.mapcalc in an attempt to gain better resolution. 

I checked the results by creating a map with the elevation and aspect rasters for both the sets of results. 

I set the aspect raster to 50% transparency, to make the elevation raster visible below. Figure 34 

asp_rcont_1 and el_rcont_1 rasters and Figure 35 asp_rcont and el_rcont rasters show the results. 

However, with the latest version of GRASS multiplying by 100 and dividing by 100 now has no effect on 

the resolution. Previously, r.surf.contour only used integer arithmetic to interpolate the surface 

between the contours. This tool has now been updated to use floating point 

(http://trac.osgeo.org/grass/ticket/1168). 

Figure 36 el_rcont in nviz shows the result in nviz. 

 

 

Figure 31 el_lid792_cont1m_100 contours multiplied by 100 

Page 14: Lloyd hw7 mea582f11 - files.transtutors.com · 2 Task This assignment's tasks were to interpolate elevation surfaces using various approaches and understand the differences and problems

14  

 

Figure 32 el_rcont elevation raster  Figure 33 el_rcont_1 elevation raster 

 

 

 

Figure 34 asp_rcont_1 and el_rcont_1 rasters 

 

Page 15: Lloyd hw7 mea582f11 - files.transtutors.com · 2 Task This assignment's tasks were to interpolate elevation surfaces using various approaches and understand the differences and problems

15  

 

Figure 35 asp_rcont and el_rcont rasters 

 

 

Figure 36 el_rcont in nviz 

ESRIArcMap

ComputingDEMbasedonVoronoiPolygonsI used the Analysis Tool, Create Thiessen Polygons tool to read a set of points with an elevation attribute 

and build the Voronoi polygons (Figure 37 Voronoi Polygons created around points) with the same 

elevation attribute.  I then used the Polygon to Raster tool convert the polygon vector shapefile to an 

elevation raster.  

Page 16: Lloyd hw7 mea582f11 - files.transtutors.com · 2 Task This assignment's tasks were to interpolate elevation surfaces using various approaches and understand the differences and problems

16  

To check the result I used the 3D Analyst, Raster Surface, Hillshade tool to create a hillshade raster and 

superimposed this on the elevation raster. (I set the Cell Size Raster Analysis environment setting to 2m 

to match the cell size used in the Polygon to Raster.)  Figure 38 elev_vor2m elevation raster with 

hillshade shows the result. 

 

Figure 37 Voronoi Polygons created around points 

 

Figure 38 elev_vor2m elevation raster with hillshade 

 

Page 17: Lloyd hw7 mea582f11 - files.transtutors.com · 2 Task This assignment's tasks were to interpolate elevation surfaces using various approaches and understand the differences and problems

17  

InterpolateDEMusingTINI used the same set of points to create a Triangulated Irregular Network (TIN) using the 3D Analysis Tool, 

TIN Management, Create TIN Tool. The TIN interpolates the elevation value using the points setting the 

elevation attribute of the triangle to that of the point contained in the triangle.  Figure 39 Zoom in on 

TIN to show Triangles shows the triangles. Figure 40 TIN showing Topology shows the entire layer.  

I then used the 3D Analysis, Conversion, From TIN, TIN to Raster tool to create an elevation raster. I 

checked the result using a hillshade raster as seen in Figure 41 tinrast_2m Elevation Raster created from 

TIN with Hillshade. 

 

Figure 39 Zoom in on TIN to show Triangles 

 

Figure 40 TIN showing Topology 

Page 18: Lloyd hw7 mea582f11 - files.transtutors.com · 2 Task This assignment's tasks were to interpolate elevation surfaces using various approaches and understand the differences and problems

18  

 

Figure 41 tinrast_2m Elevation Raster created from TIN with Hillshade 

 

InterpolateDEMusingIDWI again used the same set of points but with the Spatial Analysis Tools, Interpolation, IDW tool to create 

an elevation raster.  I checked the result using a hillshade as seen in Figure 42 elev_idw_2m Elevation 

Raster with Hillshade. 

 

Figure 42 elev_idw_2m Elevation Raster with Hillshade 

Page 19: Lloyd hw7 mea582f11 - files.transtutors.com · 2 Task This assignment's tasks were to interpolate elevation surfaces using various approaches and understand the differences and problems

19  

DiscussionThere are various differences in the methods for creating elevation rasters that a researcher needs to 

take into consideration. For example, the Voronoi polygon method creates a non‐continuous elevation 

raster since the elevation within each polygon is constant. This will cause areas to appear flat or 

stepped, when they are in fact on a slope.  

With the TIN method elevation is continuous but the rate of elevation change is not continuous resulting 

in sharp edges at the borders of the triangles.  

The IDW method creates “bull’s eyes” or knobs around elevation extremes when the distance between 

points is greater that cell size. This would make the topology look like it had more spikes and holes than 

were actually present. 

With IDW varying the interpolation algorithm’s input parameters can reduce these effects, but also 

cause a side effect of bringing the extremes elevations closer to the middle (Figure 25 p=0.5 npoint=5 

Histogram and Figure 26 p=0.5 npoint=60 Histogram). Depending on the application, the research must 

choose between these trade‐offs.  

Linear interpolation from contours may introduce additional error since there are two levels of 

interpolation; one when creating contours from a set a points and a second from the contours to the 

elevation raster. In addition, the points on lines between contours will all have the same slope making 

the method bad of slope analysis. 

While completing this assignment, I made an observation unrelated to interpolation of elevation rasters. 

The ArcMap Spatial Analyst, Surface, Hillshade tool creates a raster of light intensity with an imaginary 

light source at azimuth 315 degrees (default). This results in a raster with highest illumination values on 

slopes with aspects of 315 degrees and lowest values on slopes 180 degrees opposite or 135 degrees. In 

contrast the GRASS r.slope.aspect command in conjunction with the r.colors color=aspect command 

causes the brightest cells to be those assigned the value of 180, but since cell values are assigned by 

aspect starting at East equal 360 and decrease clockwise, 180 is assigned to cells with slope facing West 

not North West as in ArcMap. The result is a different hillshade not necessarily what the viewer is 

accustomed to. 

 

ConclusionAs with many computer applications reading the manual and determining the commands and inputs is 

the easy part. Understanding the details of the processing is much more difficult. Creating elevation 

rasters is one of these applications. The various methods all create an elevation raster and that raster 

may look correct when displayed, but knowing the inaccuracies in each representation will help the 

researcher choose the correct method. 


Recommended