[GIS] Giving 2d contours Z-height from attribute table in QGIS

2d3dcontourqgisterrain

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.

Best Answer

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