AutoCAD图纸
司机简称
DWG
生成依赖项
开放设计联盟泰加类库
OGR supports reading most versions of AutoCAD DWG when built with the Open Design Alliance Teigha library. DWG is an binary working format used for AutoCAD drawings. A reasonable effort has been made to make the OGR DWG driver work similarly to the OGR DXF driver which shares a common data model. The entire contents of the .dwg file is represented as a single layer named "entities".
通过OGR,DWG文件被认为没有地理参考信息。所有功能都将具有以下通用属性:
图层:DXF图层的名称。默认图层为“0”。
子类:如果可用,元素所属类的列表。
ExtendedEntity:在可用的情况下,扩展实体属性都附加到单个文本属性中。
线型:可用时,用于此实体的线型。
entity handle:十六进制实体句柄。一种功能id。
文本:标签的文本。
在翻译元素时,通过OGR特征样式信息合理地保留了行颜色、行宽度、文本大小和方向。目前没有努力保留填充样式或复杂的线样式属性。
配置选项
The following configuration options are available:
OGR_ARC_STEPSIZE
: The approximation of arcs, ellipses, circles and rounded polylines as linestrings is done by splitting the arcs into subarcs of no more than a threshold angle. This angle is the OGR_ARC_STEPSIZE. This defaults to four degrees, but may be overridden by setting the configuration variable.DWG_INLINE_BLOCKS
: The default behavior is for block references to be expanded with the geometry of the block they reference. However, if theDWG_INLINE_BLOCKS
configuration option is set to the value FALSE, then the behavior is different as described here:新的图层将被称为块。它将包含文件中定义的每个块的一个或多个要素。除了通常的属性外,它们还将有一个BlockName属性来指示它们是哪个块的一部分。
The entities layer will have new attributes BlockName, BlockScale, BlockAngle and BlockAttributes.
BlockAttributes will be a list of (tag x value) pairs of all visible attributes (JSON encoded).
引用的块将用相应的信息填充这些新字段(对于所有其他实体,它们为空)。
块参照将不具有块几何图形内联-而是具有插入点的点几何图形。
The intention is that with
DWG_INLINE_BLOCKS
disabled, the block references will remain as references and the original block definitions will be available via the blocks layer.DWG_ATTRIBUTES
: If option is set to TRUE value, then block attributes are treated as feature attributes, one feature attribute for each tag. This option allow conversion to rows and columns data such as database tables.DWG_ALL_ATTRIBUTES
: If option is set to FALSE value, then block attributes are ignored if the visible property of the tag attribute is false. To see all attributes setDWG_ALL_ATTRIBUTES
to TRUE value (this is the default value).
建筑物
见 ODA platform support 在ODA支持下建立GDAL。