Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including
Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
6 years, 9 months ago
I've been using GIS softwares in the past few years by I'm new using AutoCAD.
Well, I have contour lines in AutoCAD and I want to export it into QGIS (I also have access to ArcMAP).
I saved as .dxf (AutoCAD 2007/LT 2007 DXF) in AutoCAD. It opened fine in QGIS. However, it seems that didn't export the contour values (Take a look in the attribute table).
Am I missing some step?
64.5k 28 28 gold badges 105 105 silver badges 323 323 bronze badges
Jun 22, 2016 at 13:11
1,000 1 1 gold badge 9 9 silver badges 26 26 bronze badges
If it is 3D DXF, follow the steps:
import the dxf in QGIS (DRAG & DROP or CTRL + V);
save as vectors (as the right mouse button);
add new field Z (integer);
Browser Panel to create a new database spatialite;
DBManager to import the shape in the newly created database;
run the update query;
step 3 - add new field Z
step 5 -DB Manager
step 6 - query
Jun 22, 2016 at 22:15
4,092 1 1 gold badge 12 12 silver badges 28 28 bronze badges
@pigreco's answer should work.
But here a simpler solution without the spatialite process (step 1 to 2 are the same).
Load your .dxf and export (save as...) as shapefile (or spatialite / postgis).
On the new layer, use the Field Calculator (accessible from the main toolbar or from the attribute table).
Setup the new column (name and type, virtual or not depending on your needs) and use the expression :
As @pigreco said, your dxf needs to be 3D.
1,674 15 15 silver badges 24 24 bronze badges
Jun 22, 2016 at 23:40
901 4 4 silver badges 10 10 bronze badges
I was having a similar issue. From CAD I extracted major and minor contours (command: _AeccSurfaceExtractObjects). From there, select all the 3Dpolylines generated from the extraction, and export to shapefile format (command: mapexport). In the export dialog box, select "Line" for object type, and "Select Manually". To get the Z-values, select the "Data" tab in the dialog box, and hit the "Select Attributes" button. From there, select the object property which contains the Z-values. This shapefile can then be directly imported to QGIS as a vector layer.
Hope this helps someone!
Jun 26, 2019 at 17:34
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our
Accept all cookies
Necessary cookies only