Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a contour data file downloaded from UK Ordnance Survey, which gives 2d contours of an area in gml format (also supplied in .shp format) with the heights of each contour attached to the attributes of each line.

I want to give the contours a Z value of the height attribute attached to it, so that I have a 3d contour file I can then use in QGIS to create hillside shading etc, and potentially export to dxf/dwg.

Is there a way to do this without manually moving each line?

I was hoping for an actual tool I can use, as I have no script experience - I am willing to learn this if necessary, but would appreciate it if any answers that might refer to scripting please be as patient as possible, as I am clueless with where to even start to run a script!

I'm using QGIS at the minute but also have access to ArcGIS 9.2 (though none of the add-on program packages, just basic ArcMap.)

Thanks - Lisa

share|improve this question
Gene - thanks so much for your detailed response! I have managed to create a raster colour map of heights as below, and I've been playing around with GRASS (though for some reason I can't see anything in 3D as I get the error: 'module nvis not found'? Hopefully once I can do this I can export a 3d layer. And nhopton - thanks for your advice - I do realise it's a bit easier to use the point files and .asc files, but annoyingly the legislation I'm working to specifies using contour data rather than point, which is why I am trying to convert this to a useable 3d rather than use the points files. – Lisa SH Oct 28 '13 at 12:59
up vote 3 down vote accepted

You don't need to convert your layer in 3D layer to make interpolations, you only need the z attribute.

You can choose between working with the contour lines or with points:

1) with the contour lines:

enter image description here

enter image description here

enter image description here

2) with points

You can create points along input lines with GRASS GIS or SAGA GIS in the Processing Toolbox or with PyQGIS in the Python console.

enter image description here

And you can use

enter image description here

3D raster in GRASS GIS nviz

share|improve this answer

It's not necessary to to interpolate your contour shapefiles to obtain data for jobs like making shaded-relief and elevation-coloured layers. The OS OpenData dataset 'Terr50' includes DEMs (Digital Elevation Models) as *.asc files that can be used directly for these purposes.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.