Extract Contours with 3D polylines from DEM...
For those GIS techs out there or anyone who knows: I have 2 DEM datasets and I've been trying to extract some contour lines from it (using QGIS) to a DXF/DGN file but every time I do this, when I open the CAD files the contours are there but all lines are set to zero elevation.
I have been trying to find a solution for this for the greater part of the day with no success. Does anyone know a simple extraction tool to get contours lines in 3D exported to a DXF/DGN file? Thank you.
When you extract contours from DEM in Qgis (under advanced parameters, make sure "produce 3D vetor is checked")
then when you export to DXF you will have elevations.
When you extract with 3d vector checked are you adding layer to Qgis?
This new layer (it can have old name but it needs to the the one when 3d vector was checked) is what needs to be exported.
right click on layer in Qgis, export, save feature as dxf.
Under geometry is "included z-dimension" gray and checked?
Also in Qgis if you Identify feature on your contour layer, does this show elev value?
Using QGIS 3.4.10 here, can export to DXF with elevations like ozzy84 describes above.
As you generate the contours, check the "Produce 3D Vector" under "Advanced Parameters".
Then when you export that layer to DXF, under Geometry the type will likely be Automatic (which works), the option "Include Z dimension" will be gray but checked already.
I typically use the "Produce 3D Vector" option as described above to produce the contours, but if you forget to check this option, you can use the [Set Z value] tool in the [Vector geometry] toolbox to retroactively add the Z values.
Once the dialog for the tool opens, select the [Input layer] containing the contours. Click the symbol to the right of the [Z Value] input box. Click [Variable] and then the click the name of the tabular field that contains the Z values. Finally, Click [Run].