I'm trying to convert points (with their elevations) into a dxf file for use in AutoCAD LT. I've tried "save as" to dxf for the layer, which appears to almost work…the dxf has x and y location information, but the elevations associated with the points are not present.
I also tried the "dxfauth" openware tool, but that did the same as the above. Thanks!
Best Answer
QGIS does not manage Z coordinates importing CSV files.
You can convert the CSV to DXF using
ogr2ogr
from the command-line shell. This should be already installed since QGIS uses OGR too.You need to create a
.vrt
file along your CSV. This is a plain-text file that you can create with any text editor. It is really easy in your case:Save this file in the same directory as the CSV file. If the CSV file is called
dave.csv
, it is practical to name itdave.vrt
. Check on the third line that theSrcDataSource
is correct, that is that the filename is the same as your CSV file. TheLayerSRS
can probably stay like this, as DXF has no concept of spatial reference system.When the file is ready, from the command line you would issue:
This procedure is not needed for other formats. See this question about the
zfield
option inogr2ogr
.