Professional Documents
Culture Documents
Author
Ujaval Gandhi
Follow@spatialthoughts
Change Language
English
Download PDF
[A4] (../pdf/interpolating_point_data_a4.pdf) [Letter] (../pdf/interpolating_point_data_letter.pdf)
Share
11
For convenience, you can directly download the sample data used in this tutorial from link below.
Shapeles.zip (http://www.qgistutorials.com/downloads/Shapeles.zip)
http://www.qgistutorials.com/en/docs/interpolating_point_data.html 1/20
6/20/2016 InterpolatingPointDataQGISTutorialsandTips
Procedure
1. Open QGIS. Go to LayerAddLayerAddVectorLayer..
http://www.qgistutorials.com/en/docs/interpolating_point_data.html 2/20
6/20/2016 InterpolatingPointDataQGISTutorialsandTips
4. 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 in the Table of Contents.
5. This will reveal the data from the second layer Arlington_Soundings_2007_stpl83 . Though the data
looks like lines, it is a series of points that are very close.
http://www.qgistutorials.com/en/docs/interpolating_point_data.html 3/20
6/20/2016 InterpolatingPointDataQGISTutorialsandTips
6. Click the Zoom icon and select a small area on the screen. As you zoom closer, you will see the points.
Each point represents a reading taken by a Depth Sounder at the location recorded by a DGPS
equipment.
http://www.qgistutorials.com/en/docs/interpolating_point_data.html 4/20
6/20/2016 InterpolatingPointDataQGISTutorialsandTips
7. Select the Identify tool and click on a point. You will see the IdentifyResults panel show up on the left
with the attribute value of the point. In this case, the ELEVATION attribute contains the depth of the
lake at the location. As our task is to create a depth prole and elevation contours, we will use this
values as input for the interpolation.
http://www.qgistutorials.com/en/docs/interpolating_point_data.html 5/20
6/20/2016 InterpolatingPointDataQGISTutorialsandTips
8. Make sure you have the Interpolationplugin enabled. See Using Plugins (using_plugins.html) for
how to enable plugins. Once enabled, go to RasterInterpolationInterpolation.
http://www.qgistutorials.com/en/docs/interpolating_point_data.html 6/20
6/20/2016 InterpolatingPointDataQGISTutorialsandTips
Note
Interpolation results can vary signicantly based on the method and parameters you choose. QGIS
interpolation supports Triagulated Irregular Network (TIN) and Inverse Distance Weighting (IDW) methods
for interpolation. TIN method is commonly used for elevation data whereas IDW method is used for
interpolating other types of data such as mineral concentrations, populations etc. See the Spatial Analysis
(http://docs.qgis.org/2.2/en/docs/gentle_gis_introduction/spatial_analysis_interpolation.html) module of
the QGIS documentation for more details.
http://www.qgistutorials.com/en/docs/interpolating_point_data.html 7/20
6/20/2016 InterpolatingPointDataQGISTutorialsandTips
10. You will see the new later elevation_tin loaded in QGIS. Right-click the layer and select Zoomto
layer.
11. Now you will see the full extent of the created surface. Interpolation does not give accurate results
outside the collection area. Lets clip the resulting surface with the lake boundary. Go to Raster
http://www.qgistutorials.com/en/docs/interpolating_point_data.html 8/20
6/20/2016 InterpolatingPointDataQGISTutorialsandTips
ExtractionClipper.
12. Name the Outputfile as elevation_tin_clipped.tif . Select the Cliipedmode as Masklayer. Select
Boundary2004_550_stpl83 as the Masklayer`. Click OK.
http://www.qgistutorials.com/en/docs/interpolating_point_data.html 9/20
6/20/2016 InterpolatingPointDataQGISTutorialsandTips
13. A new raster elevation_tin_clipped will be loaded in QGIS. We will now style this layer to show the
dierence in elevations. Note the min and max elevation values from the elevation_tin layer. Right-
click the elevation_tin_clipped layer and select Properties.
http://www.qgistutorials.com/en/docs/interpolating_point_data.html 10/20
6/20/2016 InterpolatingPointDataQGISTutorialsandTips
http://www.qgistutorials.com/en/docs/interpolating_point_data.html 11/20
6/20/2016 InterpolatingPointDataQGISTutorialsandTips
15. Switch to the Tranparency tab. We want to remove the black-pixels from our output. Enter 0 as the
Additionalnodatavalue. Click OK.
http://www.qgistutorials.com/en/docs/interpolating_point_data.html 12/20
6/20/2016 InterpolatingPointDataQGISTutorialsandTips
16. Now you have a elevation relief map for the lake generated from the individual depth readings. Lets
generate contours now. Go to RasterExtractionContours.
http://www.qgistutorials.com/en/docs/interpolating_point_data.html 13/20
6/20/2016 InterpolatingPointDataQGISTutorialsandTips
17. In the Contour dialog, enter contours as the Outputfileforcontourlines. We will generate contour
lines at 5ft intervals, so enter 5.00 as the Intervalbetweencontourlines. Check the Attributename
box. Click OK.
18. The contour lines will be loaded as contours layer once the processing is nished. Right-click the layer
and select Properties.
http://www.qgistutorials.com/en/docs/interpolating_point_data.html 14/20
6/20/2016 InterpolatingPointDataQGISTutorialsandTips
19. Go to the Labels tab. Check the Labelthislayerwith box and select ELEV as the eld. Select Curved
as the Placement type and click OK.
http://www.qgistutorials.com/en/docs/interpolating_point_data.html 15/20
6/20/2016 InterpolatingPointDataQGISTutorialsandTips
20. You will see that each contour line will be appropriately labeled with the elevation along the line.
http://www.qgistutorials.com/en/docs/interpolating_point_data.html 16/20
6/20/2016 InterpolatingPointDataQGISTutorialsandTips
23Comments QGISTutorialsandTips
1 Login
Jointhediscussion
AxelAndersson 4daysago
Thankssomuchforyourworkwithalltutorials!I'mbuildingmyownpluginwhereIwanttouse
theInterpolationmethodinQgis,isitpossibletocallthefunctionandsettheparameterandrun
theInterpolation?Ihavefoundonewaytostarttheinterpolationpluginfrommypluginwith:
fromPyQt4.QtGuiimportQAction
foriteminqgis.utils.plugins['processing'].iface.rasterMenu().actions():
if"Interpolation"initem.text():
item.menu().actions()[0].activate(QAction.Trigger)
HoweverIcantfigureouthowto"control"theInterpolationPlugin,likesetwhichlayershouldbe
used,thecellsizeetc.andthenruntheplugin(Idontwanttheuserofmyplugintosetthe
Interpolationpluginparameters)
Reply Share
EdwardLo amonthago
HiUjaval,
Thankyouforyourtutorial.Itriedtoimplementthesameproceduretomypointdata,butwithout
muchsuccess.Isuspecttheproblemisrelatedtothewaymydataisorganized.Whatdoyou
think,haveyouseenthisproblembefore?
Thanks!
Reply Share
Hmm.Thatdoesn'tlookright.Trychangingyourcellsizevalueandseeifthatchanges
http://www.qgistutorials.com/en/docs/interpolating_point_data.html 17/20
6/20/2016 InterpolatingPointDataQGISTutorialsandTips
Hmm.Thatdoesn'tlookright.Trychangingyourcellsizevalueandseeifthatchanges
yourresults.
Reply Share
EdwardLo>UjavalGandhi 20daysago
Changingthecellsizeincreasestheresolutionwithinthesameareabutdoesnot
expandtheinterpolationtotherestofthepolygon.
Reply Share
David>EdwardLo 5daysago
Havingexactlythesameproblemanyideasonthesolution?Isittodo
withtheCRS?
Reply Share
priyankadas 8monthsago
HiiUjaval,
Iamtryingtoimplementordinarykrigingonvectorpointsdata,howeverduetosomereasons
outputisnotgettingdisplayed.Ifthereisanysampleexampleortutorialrelatedtothis,kindlylet
meknow.
Reply Share
Justin 9monthsago
Hello,
Iamtryingtorunaninterpolationonvectorxyzdata(pointshapefile)buttheanalysisdoesnot
seemtowork.Iamusingasimilaramountofdatatotheexampleabovehoweverthecomputer
simplyoutputsa"null"result...Anyideawhythismaybeoccurring?
Reply Share
Hardtosay.CanyouattachascreenshotofyourdataaswellastheInterpolationdialog
settings?
Reply Share
BruceAtkinson ayearago
Veryhelpfultutorial!!I'mwonderinghowonemightgoaboutdeterminingtheareawithineachof
thecontourlines.Thiswouldjustbethesimple'flat'areawithoutconsiderationofpeaks,valleys,
etc.
Thanks.
Reply Share
MariaMichail ayearago
HiUjaval,
Iwouldliketoaskyouhowisitpossible,aftertheinterpolation,toextractthedatainatextform.
Reply Share
Canyouclarifywhatdatayouwanttoextract?
Ifyouhavelocationsofpointswhereyouwanttoseetheinterpolatedvalues,useRaster
Samplingtogetthosevalueshttp://www.qgistutorials.com/e...
http://www.qgistutorials.com/en/docs/interpolating_point_data.html 18/20
6/20/2016 InterpolatingPointDataQGISTutorialsandTips
Samplingtogetthosevalueshttp://www.qgistutorials.com/e...
Reply Share
SayanAcharjee ayearago
Iamsorry,ImeanttosayhowcanIpublishthisasaninteractivewebmap....sothatanyseeker
canunderstandandseethedatasonhoveringthemouse
Reply Share
Bestoptionistoconverttherasterintovectorandusewebmappingserviceslike
CartoDBorMapboxtocreateaninteractivewebmap.
Reply Share
SayanAcharjee ayearago
HowcanIpublishainterpolatedmap?
Reply Share
http://www.qgistutorials.com/e...
Reply Share
LorraineWang ayearago
HiUjaval,
Thanksverymuchforthegreattutorial!!HoweverImetaproblem.Instep12anewlayercannot
beautomaticallyloadedintocanvas.Whatisthepossiblereasonforthat?
I'dappreciatealotforyouranswer,thanksalot!!
Reply Share
arpi>LorraineWang ayearago
Ihadexactlythesameprobleminstep12andwasunabletogoon(usingQGIS2.8).
ThenIstartedagainandunzippedtheoriginalshapefileandmanuallychosethefirst
occurrencesofthetwofilestoload.Ithelped.
Reply Share
smundLangeland ayearago
HigreattutorialUjaval!
HowwouldIgoaboutmakingpolygons/surfacesoftheareasbetweenthecontoursandthe
elevationastheattributestothesurface?
Thepointbeingtocreateapolygonshapefileforvariablerateapplicationoflet'ssaylimeafter
interpolatingthepHvaluesofsoilsamples.
Thanks.
Reply Share
Thegeneratedsurface'elevation_tin'alreadyhastheelevationvalueasanattribute.If
youwanttoconvertthosevaluestoapolygon,youRasterConversionPolygonize
Reply Share
http://www.qgistutorials.com/en/docs/interpolating_point_data.html 19/20
6/20/2016 InterpolatingPointDataQGISTutorialsandTips
Philioso ayearago
HiUjavalgreattutorialsI'mlearningverymuchhere!
Ihavetwoquestions:
Instep13youwrite"Notetheminandmaxelevationvaluesfromtheelevation_tinlayer."When
Icreatetheclipped*.tifmyvaluerangeis0542...WhenIgotothestylingstep,doIhavetoput
inthe507.296(asminimum)manually?Why?
Asyousaidthebluecolorswillbethedeepareasandtheredareaswillbeshallow.While
invertwouldchangethecolorrampmyquestionremainsthatthedeepareashavesmaller
numbersthantheshallowones...?Thisisprobablysincewehaveelevationdata,no?istherea
wayto"turnthisaround"?
Reply Share
InthePropertiestab,click'Load'underthe'Loadmin/maxvalues'section.Thiswillload
theactualminandmaxvalues.Thatshouldshowyouthe507.296valuesasmin.
Forchangingtheelevations,youcanuserastercalculatortocreateanewlayerwith
formulasuchas
545elevation_tin@1
Thiswillgiveyouarasterwithdepthvaluesinsteadofelevations.(545beingtheground
elevation)
Reply Share
DevMohan>UjavalGandhi 13daysago
HiUjaval,IhavesomedatawhichIwanttoplotasimagebandfordifferenttime
frame.HereIamstuckin1ststep,importnothappening.IhaveexcelwhichI
haveintriedwithnotepadbutstillnosuccess.canyouhelpmetostartwiththis.
Reply Share
NarcliodeSPereiraFilho 2yearsago
Greattutorial.SoonIwillcontinuetheworkoftranslationtutorialsinPortugueseBrazil.
Reply Share
ALSOONQGISTUTORIALSANDTIPS
UsingCustomPythonExpression BuildingaPythonPlugin
Functions 36commentsayearago
18commentsayearago MarkOwenFalkenbergHieverybody.Iam
CarlosHernandoRamiroDearall,Ihavea makingapluginwhereIwanttoaddafolder
question/comment.InWindowswithQGIS pathviaaQFileDialogasintheabove
2.14.1inthefunctioneditor,whenIpress example.Iusethe
http://www.qgistutorials.com/en/docs/interpolating_point_data.html 20/20