GENERATING DIGITAL ELEVATION MODELS FROM CONTOURS


A Digital Elevation Model (DEM) is a 3D representation of a terrain surface.It represents the elevation of the earths surface,including features(vegetation,buildings etc.)The terrain elevations for ground positions are sampled at regularly spaced horizontal intervals.

DEMs are mostly derived from hypsographic data(contour lines) and this is what i have demonstrated below using QGIS version 2.8.

DEMs are useful and has many applications;
  • creation of relief maps
  • rendering of 3D visualization
  • 3D flight planning
  • Line of sight analysis
  • Modelling water flow etc.
  •  
1.In this tutorial,we will be using GRASS,which has a plug-in inQGIS.So to start ensure that the GRASS plug-in is installed.Go to Plugins>Manage and install plug-ins and search for GRASS and install it.For my case it is already installed.






2.Load your contours shapefile.For my case,i have a contour shapefile covering the whole of Kenya.


3.Under Plugins>GRASS,select New Mapset



4.Browse to a folder that will hold your data and click Next


 5.Create a new location and click Next



6.Choose a projection that you will work in and click Next.Since i am working with data for the whole country,Kenya,i have choosen WGS 84/UTM zone 37s.In case you dont know which zone you are in then you can check this website  http://whatutmzoneamiin.blogspot.co.ke



7.A red triangle is drawn showing the area covered by the shapefile.Click Next and enter the name of the Mapset.









8.A window pops up showing the details that you have entered.If you are comfortable with them then click finish.






9.The next step is to load the contours shapefile in our QGIS canvas to the GRASS mapset.
Go to Plugins>GRASS>Open Grass Tools.


10.Under Module List,search for v.in.ogr.qgis.


11.Load the contours shapefile and give the output name then click Run.

 

12.Go to Module List again and search for v.rast.attr.This will convert the vector data to raster.




13.Input the vector data,check in the attribute table which column contains the elevation data and put this as the Attribute field.Then give it the output name and click Run.



14The final step is to convert the raster data into a surface.Go to Module List once again and search for r.surf.contour.




15.Input the raster data and the name of the output and click Run.



16.This generation might take some time and thus patience is necessary.











2 comments:

  1. You could have shown us a last slide of the results. Otherwise, good job bro.

    ReplyDelete
    Replies
    1. Thank you Pascal.It was taking a bit long to process but i will show the results once i access my laptop on wednesday 30 th December 2015

      Delete