Notifications
Clear all

Extract Contours with 3D polylines from DEM...

9 Posts
4 Users
0 Reactions
39 Views
(@surv3251)
Posts: 74
Member
Topic starter
 

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.

 
Posted : September 11, 2019 1:30 pm
(@ozzy84)
Posts: 113
Member
 

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.

 
Posted : September 11, 2019 1:41 pm
(@surv3251)
Posts: 74
Member
Topic starter
 

@ozzy84

Thank you. I just did this and the DXF still displays 2D lines with zero elevation.

 
Posted : September 11, 2019 1:52 pm
(@surv3251)
Posts: 74
Member
Topic starter
 

Got it. Thank you! Apparently it worked with a dgn export and checking 'Produce 3D Vector'.

 
Posted : September 11, 2019 2:05 pm
(@ozzy84)
Posts: 113
Member
 

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?

 
Posted : September 11, 2019 2:05 pm

(@surv3251)
Posts: 74
Member
Topic starter
 

@ozzy84

Thank you! I got the 3D lines on a DGN export from QGIS, and then converted to a DWG file. I'll try checking all of these suggestions tomorrow, I still want to know how to export to DXF as well, so I won't give up! 😉  

 
Posted : September 11, 2019 2:15 pm
Glenn Borkenhagen
(@glenn-borkenhagen)
Posts: 410
Supporter
 

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

 
Posted : September 11, 2019 3:25 pm
(@thomas_m)
Posts: 1
Member
 

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].

 
Posted : October 9, 2019 7:21 am
(@surv3251)
Posts: 74
Member
Topic starter
 

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.

 
Posted : October 28, 2019 2:32 pm