[GIS] Export 3D data DXF file

3ddatadxfexportqgis

I'm trying to export a DXF file from QGIS 1.8.0 Lisboa and can not have a 3D file in AutoCAD or Microstation. It results always in 2D file.

How can I export height data from a shapefile in QGIS?

Best Answer

If you want to get a 3D DXF from a SHP (SHPfile generated from DTM with Qgis-Processing-Tools-GDAL/OGR Extraction-Contour), you must:

1) have column with Z values into Table attributes of SHP. 2) open "OSGeo4W Shell Commands" if you have Windows OS. 3) write into shell for example:

ogr2ogr -f "dxf" d:\Temp\3Doutput.dxf d:\Temp\contour.shp -zfield ELEV

the syntax is as follows: ogr2ogr -f "DXF" {outFile} {inFile} -zfield {ColumnWithZValue}

If an error appear, ignore it, go to the folder that contain the output file and if you find a file named "3Doutput" without extension (in this example), rename it as "3Doutput.dxf", then you will can open it with AutoCAD or other software.

Related Question