Activity Feed › Discussion Forums › Software, CAD & Mapping › Extract Contours with 3D polylines from DEM…
Extract Contours with 3D polylines from DEM…
Posted by surv3251 on September 11, 2019 at 8:30 pmFor 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.
surv3251 replied 4 years, 5 months ago 4 Members · 8 Replies- 8 Replies
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.
Got it. Thank you! Apparently it worked with a dgn export and checking ‘Produce 3D Vector’.
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.
GB
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].
Thanks for the replies. I tried it again with another file I’m working atm and it worked…somewhat. When I open the DXF file I do get a ‘INTERAL ERROR’ message and can’t open the file unless I recover it as a dwg file, which when I do I can see all lines as 3D lines.
I have now another question: is it possible to take a DEM file and transform it into another datum including the elevations from meter to US Survey feet?
I’ve been trying to do this (again using QGIS 3.4.2) and so far I have managed to transform it from EPSG: 6343 (NAD83/UTM-14N-Meter) to EPSG: 2277 (NAD83/TX-C Feet).
Horizontally, I get the desired result but when I check my contours they are still in meter.
Log in to reply.