# AutoCAD DXF/DWG

Writing simple AutoCAD DXF and DWG files is supported. Reading of DXF and DWG files is currently not supported. The ability to write DXF and DWG is only available when OGR is linked against the DWGdirect library provided by the Open Design Alliance. Note that the DWGdirect library is not open source, though the license terms are not terribly draconian. Check the Open Design Alliance web site for details.

There are two distinct drivers, DXF for writing AutoCAD ASCII DXF files, and DWG for writing AutoCAD binary DWG files. However, the data model and behavior of both drivers is essentially identical.

The DXF/DWG drivers currently operate in a highly simplified manner when writing. They discard all coordinate system information. Attributes are written as extended entity data (DXF type 1000) in the ACAD application. Features are written out as one DXF/DWG entity per simple geometry object. For complex geometry objects such as mutli-ring polygons, multipolygons, and other geometry collections, a distinct entity is written out for each simple geometry subcomponent. Amoung other things, this means that the association between the outer and inner rings of a polygon is lost, as well as the association of different geometries in a geometry collection.

All entities are written out in "model space". A layer is established for each OGR layer written, and the entities attached to the appropriate layer.

## Database Creation Options

- VERSION=[12/13/14/15/18]: Set the format version to generate.

## Layer Creation Options

- COLOR=r,g,b: Set the color of a layer.

### See Also

- Open Design Alliance (home of DWGdirect library).

OSGIS and the Geo-Information and ICT Department of the Ministry of Transport, Public Works and Water Management funded development of this driver.