Community Forums

Share:

Extract Contours with 3D polylines from DEM...  


Surv3251
Posts: 26
Member
(@surv3251)
20+ posts
Joined: 3 years ago

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.

6 Replies
ozzy84
Posts: 52
Member
(@ozzy84)
50+ posts
Joined: 4 years ago

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.

Reply
2 Replies
Surv3251
Member
(@surv3251)
Joined: 3 years ago

20+ posts
Posts: 26

@ozzy84

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

Reply
Surv3251
Member
(@surv3251)
Joined: 3 years ago

20+ posts
Posts: 26

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

Reply
ozzy84
Posts: 52
Member
(@ozzy84)
50+ posts
Joined: 4 years ago

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?

Reply
1 Reply
Surv3251
Member
(@surv3251)
Joined: 3 years ago

20+ posts
Posts: 26

@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! Wink  

Reply
Glenn Borkenhagen
Posts: 343
(@glenn-borkenhagen)
250+ posts
Joined: 9 years ago

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

Reply
Default
:)
:d
:wink:
:mrgreen:
:neutral:
:twisted:
:arrow:
:shock:
:???:
:cool:
:evil:
:oops:
:razz:
:roll:
:cry:
:eek:
:lol:
:mad:
:sad:
:!:
:?:
:idea:
:hmm:
:beg:
:whew:
:chuckle:
:silly:
:envy:
:shutmouth: