2

I need to use a .DXF in either QGIS or ArcGIS.

However, if an Arc occurs in a .DXF drawing and if this file is opened in QGIS, I noticed that the geometry of the Arc is simplified. I did a test:

  • draw circles in LibreCAD and save as .DXF (I uploaded it here)
  • open in QGIS
  • convert to shapefile
  • edit shape

The circles, regardless of their size are approximated by 90 segments, so a 4-degree long circle segment is represented by a straight line. In my application this causes significant deviations (>25cm) in a canal design project...

I tried the same in ArcGIS. There, the simplification depends on the circle size - small circles have fewer segments, larger circles have more. So, in my case (for the kilometer long radius in canal bends) ArcGIS seems like the better choice.

As a side note: In ArcGIS the Arc of the .DXF is not simplified when visualized - the display of the .DXF seems correct when overlying with the exported shapefile. Within ArcGIS this would make at least snapping and digitization in higher accuracy possible.

I am a beginner in using .DXF files in GIS, but I feel this should be a popular problem. Though, after searching for a while I could not find a hint anywhere. I still fear I may miss something obvious... In case not, does anybody have a workaround for this?

I am using QGIS 2.10 (GDAL 1.11.2) and ArcGIS 10.2

4
  • 2
    Have you tried converting your DXF to a file geodatabase feature class. File geodatabases, unlike shapefiles, support true curves.
    – PolyGeo
    Commented Oct 15, 2015 at 23:02
  • Thanks. Yes, the arc is maintained! But since I need to edit the arc in GIS (split, add attributes) this is not an option for me.
    – openwater
    Commented Oct 16, 2015 at 6:59
  • 1
    You should be able to use Densify (Editing) to put in as many vertices as you want to do that editing.
    – PolyGeo
    Commented Oct 16, 2015 at 7:02
  • Indeed! Thank you very much. Actually - this is the method I will end up using because it fully keeps the arc accuracy! This would be my accepted answer if you post it.
    – openwater
    Commented Oct 16, 2015 at 7:12

2 Answers 2

2

You must probably convert dxf into shapefile or some other format with ogr2ogr and set smaller stepsize as documented in http://www.gdal.org/drv_dxf.html:

The approximation of arcs, ellipses, circles and rounded polylines as linestrings is done by splitting the arcs into subarcs of no more than a threshhold angle. This angle is the OGR_ARC_STEPSIZE. This defaults to four degrees, but may be overridden by setting the configuration variable OGR_ARC_STEPSIZE.

The syntax is to add into ogr2ogr command --config OGR_ARC_STEPSIZE=2

If your QGIS is using GDAL 2.0 or higher it might be able to read arc directly from GML or PostGIS but still not from DXF https://trac.osgeo.org/gdal/wiki/rfc49_curve_geometries.

1
  • Thanks! I was looking for exactly something like this to set user defined accuracy thresholds. Though the ogr --config syntax (GDAL 1.11.2) is without the '=': ogr2ogr.exe -f "ESRI Shapefile" circle1.shp circle.dxf --config OGR_ARC_STEPSIZE 1
    – openwater
    Commented Oct 16, 2015 at 6:53
1

I recommend that you convert your DXF to a file geodatabase feature class which, unlike shapefiles, will support true curves.

You should be able to use Densify (Editing) to put in as many vertices as you want to use during any subsequent editing.

1
  • As written in the discussion to the question, this is my accepted answer because it fully keeps the accuracy of the arc.
    – openwater
    Commented Oct 16, 2015 at 7:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.