[GIS] Generating DEM from contour Shapefile using QGIS

contourconvertdemgrassqgis

I want to create a DEM from depth contours (shapefile) in QGIS. I've been trying to work out how to do this based on this previous question, notably from this link from that page, however I'm stuck, and was hoping someone could help.

My progress/process so far:

  1. open new map in QGIS, import the contour shapefile
  2. set GRASS extent, set new GRASS mapfile, etc
  3. try to 'import' the shapefile into grass by converting it into a grass file, based on a hunch from the wording in this page (search in page: 'use of qgis and grass'): file management, import into grass, import vector into grass, import loaded vector (v.in.ogr.qgis), then view output. This creates an identical looking layer.
  4. try to use r.surf.contour on this – doesn't allow layer to be selected.
  5. try to use r.surf.contour2 on this – either crashes QGIS or produces a full block of colour.

Any thoughts/tips on what I should be doing differently?


Interpolation failing, tried everything in GRASS & in GRASS plugin, failed, could problem be due to source shapefile?

Something I learnt from elsewhere was 'geometry tools > check geometry validity' which I ran on the contour shapefile and it found loads of errors.

I'm wondering if this could be the reason that all my efforts to create a DEM are failing?

Would anyone do me the huge favour of having a look at my shapefile to see if I'm just being useless, or if it's a problem that a relative novice would be excused for not anticipating?

Best Answer

I used this tutorial to create a Digital Terrain Model (DTM).

It uses as input contour shapefiles converted in raster contours that are later interpolated in DTM (looks like a continuous heat map)

It is not using QGIS but just GRASS, but it may be feasible with the Grass plugin from QGIS.

Related Question