Interpolation is a commonly used GIS technique to create continuous surfacefrom discrete points. A lot of real world phenomena are continuous -elevations, soils, temperatures etc. If we wanted to model these surfaces foranalysis, it is impossible to take measurements throughout the surface. Hence,the field measurements are taken at various points along the surface and theintermediate values are inferred by a process called ‘interpolation’. In QGIS,interpolation is achieved using the built-in
Interpolationplugin
.Overview of the task¶
We will take field depth measurements for a Lake Arlington in Texas and createan elevation relief map and contours from these measurements.
Other skills you will learn¶
- Creating contours from point data.
- Masking no-data values from a raster layer.
- Adding labels to a vector layer.
Get the data¶
Texas Water Development Board provides the shapefiles for completed lakesurveys.
The Empirical Bayesian Kriging tool is used to perform the underlying interpolation. This tool is part of the ArcGIS Geostatistical Analyst extension. Many parameters of the tool are exposed in Interpolate Points, but many are controlled automatically by the Optimize for parameter. Understanding raster interpolation. Interpolation predicts values for cells in a raster from a limited number of sample data points. It can be used to predict unknown values for any geographic point data: elevation, rainfall, chemical concentrations, noise levels, and so on. The illustration on the left shows a point dataset.
Download the 2007-12 survey shapefiles for Lake Arlington.
For convenience, you can directly download the sample data used in thistutorial from link below.
Data Sources: [TWDB]
Procedure¶
- Open QGIS. Go to Layer ‣ Add Layer ‣ Add Vector Layer..
- Browse to the downloaded
Shapefiles.zip
file and select it. ClickOpen.
- In the Select layers to add... dialog, hold the
Shift
keyand selectArlington_Soundings_2007_stpl83.shp
andBoundary2004_550_stpl83.shp
layers. Click OK.
- You will see the 2 layers loaded in QGIS. The
Boundary2004_550_stpl83
layer represents the boundary of the lake. Un-check the box next to it inthe Table of Contents.
- This will reveal the data from the second layer
Arlington_Soundings_2007_stpl83
. Though the data looks like lines, it isa series of points that are very close.
- Click the Zoom icon and select a small area on the screen. Asyou zoom closer, you will see the points. Each point represents a readingtaken by a Depth Sounder at the location recorded by a DGPS equipment.
- Select the Identify tool and click on a point. You will see theIdentify Results panel show up on the left with the attributevalue of the point. In this case, the
ELEVATION
attribute contains thedepth of the lake at the location. As our task is to create a depth profileand elevation contours, we will use this values as input for theinterpolation.
- Make sure you have the
Interpolationplugin
enabled. SeeUsing Plugins for how to enable plugins. Once enabled, go toRaster ‣ Interpolation ‣ Interpolation.
- In the Interpolation dialog, select
Arlington_Soundings_2007_stpl83
as the Vector layers in theInput panel. SelectELEVATION
as theInterpolation attribute. Click Add. Change theCellsize X and Cellsize Y values to5
. Thisvalue is the size of each pixel in the output grid. Since our source data isin a projected CRS with Feet-US as units, based on our selection, thegrid size will be 5 feet. Click on the ... button next toOutput file and name the output file aselevation_tin.tif
.CLick OK.
Note
Interpolation results can vary significantly based on the method andparameters you choose. QGIS interpolation supports Triagulated IrregularNetwork (TIN) and Inverse Distance Weighting (IDW) methods for interpolation.TIN method is commonly used for elevation data whereas IDW method is usedfor interpolating other types of data such as mineral concentrations,populations etc. See the Spatial Analysismodule of the QGIS documentation for more details.
- You will see the new later
elevation_tin
loaded in QGIS. Right-clickthe layer and select Zoom to layer.
- Now you will see the full extent of the created surface. Interpolation doesnot give accurate results outside the collection area. Let’s clip theresulting surface with the lake boundary. Go to Raster ‣Extraction ‣ Clipper.
- Name the Output file as
elevation_tin_clipped.tif
. Select theCliiped mode as Mask layer. SelectBoundary2004_550_stpl83
as the Mask layer`. ClickOK.
- A new raster
elevation_tin_clipped
will be loaded in QGIS. We will nowstyle this layer to show the difference in elevations. Note the min and maxelevation values from theelevation_tin
layer. Right-click theelevation_tin_clipped
layer and select Properties.
- Go to the Style tab. Select Render type as
Singlebandpseudocolor
. In the Generate new color mappanel, selectSpectral
color ramp. As we want to create a depth-map asopposed to a height-map, check the Invert box. This will assignblues to deep areas and reds to shallow areas. Click Classify.
![Points Points](/uploads/1/2/5/8/125837942/925748157.png)
- Switch to the Tranparency tab. We want to remove theblack-pixels from our output. Enter
0
as the Additional nodata value. Click OK.
- Now you have a elevation relief map for the lake generated from theindividual depth readings. Let’s generate contours now. Go toRaster ‣ Extraction ‣ Contours.
- In the Contour dialog, enter
contours
as theOutput file for contour lines. We will generate contour linesat 5ft intervals, so enter5.00
as the Interval betweencontour lines. Check the Attribute name box. ClickOK.
- The contour lines will be loaded as
contours
layer once the processingis finished. Right-click the layer and select Properties.
- Go to the Labels tab. Check the Label this layerwith box and select
ELEV
as the field. SelectCurved
as thePlacement type and click OK.
- You will see that each contour line will be appropriately labeled with theelevation along the line.
In an area of 125 square kilometers with about 2000 sampling points distributed at a density between 10 to 500 meters, if high resolution is not a primary concern, you can generalize or simplify information to facilitate administration of this process what you can be done using a set of tools ArcGIS (similar in QGIS or gvSIG process), such as interpolation, creating a homogeneous mesh points and extract the values of a raster from a point layer.
This example is intended to generalize the points at a density of 1000 x 1000 meters, the first step is to interpolate the data with the aim of creating a raster image information to simplify the method of inverse distance interpolation IDW, conforms to variable (monthly precipitation) in the exercise, also be used Kriging, Spline, Natural Neighbor, among others.
ArcToolbox > Spatial Analyst Tools > Interpolation
It then proceeds to create a grid of points of 1000 x 1000 meters, with the Create Fishnet tool located in:
ArcToolbox > Data Management Tools > Feature Class
Report an output directory in a geodatabase in Template Extent select the point layer (or interpolated raster) to get the same extension, cell size drop spacing in meters in width and high, check the Create Label Point box, leaving the remaining fields by default.
The last process is to extract the values of the interpolated raster IDW and transfer the values to the point layer obtained with the Create Fishnet tool, to do this use the Extract Values to Points tool (activate the Interpolate values at the point locations box) located at:
ArcToolbox > Spatial Analyst Tools > Extraction
The layer contains general points estimated based on the interpolated data from the initial information values. Another option would create a Spatial Join between the mesh points (created with fishnet) and the centroids of the initial layer of points.
Please help me with writing (comment), my English is not good.