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:
<OGRVRTDataSource>
<OGRVRTLayer name="test">
<SrcDataSource>dave.csv</SrcDataSource>
<GeometryType>wkbPoint</GeometryType>
<LayerSRS>WGS84</LayerSRS>
<GeometryField encoding="PointFromColumns" x="x" y="y", z="elev"/>
<Field name="id" type="String"/>
<Field name="description"/>
</OGRVRTLayer>
</OGRVRTDataSource>
Save this file in the same directory as the CSV file. If the CSV file is called dave.csv
, it is practical to name it dave.vrt
. Check on the third line that the SrcDataSource
is correct, that is that the filename is the same as your CSV file. The LayerSRS
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:
ogr2ogr dave.dxf dave.vrt
This procedure is not needed for other formats. See this question about the zfield
option in ogr2ogr
.