Mapping Specification for DWG/DXF (MSD) An ESRI Technical paper

Similar documents
Mapping Specification for DWG/DXF (MSD) C#.NET Code Samples

Using CAD Data in ArcGIS

13/10/2011. Data Integration and Interoperability. Gordon Sumerling & Maree Wilson

Working with the Geodatabase Using SQL

Working with ArcGIS Network Analyst

Developing Web Apps with ArcGIS API for JavaScript TM. Student Edition

ArcGIS Desktop I: Getting Started with GIS

ArcGIS 1: Introduction to GIS. Student Edition

ArcGIS 9. Installation Guide: Workgroup for Microsoft SQL Server Express

ArcGIS 3: Performing Analysis. Student Edition

ESRI Systems Integration Technical Brief Identifying Firewall TCP Server Ports In a Enterprise ArcIMS Configuration

An Esri White Paper October 2010 Esri Production Mapping Product Library: Spatially Enabled Document Management System

Animation in ArcMap Tutorial

An Esri White Paper August 2010 Product Library in Esri Aeronautical Solution: Enabling Seamless Product, Data, and Document Management

Geographic Information Systems for Java

ArcSDE Database Servers Tutorial

How To Build Gis Applications With An Arcgis Engine

ArcGIS 9. Installation Guide: ArcSDE for SQL Server Express licensed through ArcGIS Server Workgroup

Using Microsoft SQL Server Snapshot Replication With ArcSDE Data

An Esri White Paper June 2010 Tracking Server 10

Cartographic Design Process: Artistic Interpretation With the Geodatabase

Geodatabase Archiving: Introduction to Concepts and Capabilities

Configuring a Distributed Installation of ArcGIS Server (Windows)

ArcGIS. Server. A Complete and Integrated Server GIS

How To Improve Gis Data Quality

Data Integration for ArcGIS Users Data Interoperability. Charmel Menzel, ESRI Don Murray, Safe Software

ArcGIS. Image Server tutorial

Bentley ArcGIS. Connector

An Esri White Paper June 2011 ArcGIS for INSPIRE

Metadata and GIS. An ESRI White Paper October 2002

Publishing Hosted 3D Feature Layers. An Esri White Paper September 2015

An ESRI White Paper June 2009 ESRI K 12 Solutions: School Bus Routing Using ESRI Tools to Address the Problems

An ESRI White Paper October 2009 ESRI Geoportal Technology

An ESRI White Paper July 2009 Creating and Maintaining a Geoportal Management Considerations

An Esri White Paper February 2011 Best Practices for Storing the ArcGIS Data Reviewer Workspace in an Enterprise Geodatabase for Oracle

GIS and Mapping Solutions for Developers. ESRI Developer Network (EDN SM)

An Esri White Paper June 2007 Developing and Deploying an Integrated Geoenabled SOA Business Solution: A Case Study

Virtualization of ArcGIS Pro. An Esri White Paper December 2015

Getting Started with ArcGIS

Effective Collaboration using Revit Structure and AutoCAD MEP

Performance Tips and Tricks for ArcGIS Desktop 8.1

ArcGIS Network Analyst: Networks and Network Models

11/11/2014. Sharif University of Technology. Session # 9. Computer-Aided Design (CAD) Department of Industrial Engineering. Geometric modeling

GS It s Not Just a Smallworld Anymore

Five Best Practices for Maintaining an Enterprise Geodatabase

Data Interoperability Extension Tutorial

Cartography with ArcGIS

An ESRI White Paper December 2007 Enterprise GIS for Local Government

System Architecture Design Strategies. Student Edition

ArcGIS : Engineered for Interoperability

Introduction to the ArcGIS Data Model and Application Structure

GIS Organizational Structure and Staffing

GIS Databases With focused on ArcSDE

Introduction to GIS.

Effective Collaboration

An Esri White Paper February 2011 Best Practices for Storing the ArcGIS Data Reviewer Workspace in an Enterprise Geodatabase for SQL Server

Making Your Mobile Workforce More Efficient

Making Your Mobile Workforce More Efficient

Understanding ArcSDE. GIS by ESRI

An ESRI White Paper May 2007 Mobile GIS for Homeland Security

Esri ArcGIS Server 10 for VMware Infrastructure

The Geospatial Approach to Cybersecurity: An Executive Overview. An Esri White Paper January 2014

An Esri White Paper January 2010 ArcGIS Server and Virtualization

Use this translator to save ArchiCAD layouts/views in DXF/DWG format if you plan to continue

An Esri White Paper July 2010 Highway Data Management in ArcGIS

Data Modeling Basics. John Auel GIS Technician II United Services Group

Data Fusion Centers. Transforming Public Safety Information into Actionable Knowledge

Spatial Adjustment Tools: The Tutorial

SIEBEL PROFESSIONAL SERVICES AUTOMATION GUIDE

Siebel Professional Services Automation Guide

ArcGIS 9. Installing ArcPad 8.0

Creating Figure Ground Maps in ArcMap 10.x: Basic procedures to download, open, manipulate and print spatial data

An Esri White Paper October 2010 Developing with Esri Business Analyst Server

An ESRI White Paper May 2007 GIS Supporting the Homeland Security Mission

Questions and Answers

GIS I Business Exr02 (av 9-10) - Expand Market Share (v3b, Jul 2013)

The GeoMedia Architecture Advantage. White Paper. April The GeoMedia Architecture Advantage Page 1

Converting GIS Datasets into CAD Format

Abstract. Introduction

ArcGIS Spatial Analyst: Advanced GIS Spatial Analysis Using Raster and Vector Data

An ESRI White Paper May 2010 ESRI Business Analyst Enterprise Deployment

MrSID Plug-in for 3D Analyst

ArcGIS Server in Practice Series: Best Practices for Creating an ArcGIS Server Web Mapping Application for Municipal/Local Government

System Monitoring and Diagnostics Guide for Siebel Business Applications. Version 7.8 April 2005

An Esri White Paper May 2012 ArcGIS for Emergency Management

Quick Start Guide to. ArcGISSM. Online. for Public Accounts

An Esri White Paper April 2011 Esri Business Analyst Server System Design Strategies

GIS for Real-Time Crime Centers. An Esri White Paper June 2013

Improving Emergency Planning and Response with Geographic Information Systems

Cookbook 23 September 2013 GIS Analysis Part 1 - A GIS is NOT a Map!

Administering ArcSDE Microsoft. for SQL Server

There are various ways to find data using the Hennepin County GIS Open Data site:

Improving the Insurance Claims Management Process

Pennsylvania Geospatial Data Sharing Standards (PGDSS) V 2.5

Professional Labeling and Text Annotation Techniques with ArcMap

A GIS helps you answer questions and solve problems by looking at your data in a way that is quickly understood and easily shared.

Software: AutoCAD Civil 3D 2014, NRCS C3D 2014 template, ESRI ArcMap. Notation:Button to Press Displayed Text Icon Action {Text to Enter} Menu Item

DOCUMENT MANAGEMENT SYSTEM WHITE PAPER

How To Draw In Autocad

Getting Started With LP360

Transcription:

Mapping Specification for DWG/DXF (MSD) An ESRI Technical paper March, 2008 Abstract: The ESRI Mapping Specification for DWG/DXF (MSD) is a method of coding information in a DWG or DXF file to define GIS feature classes with non-geometric attribution, and the definition of a geospatial coordinate system recognized by ESRI s ArcGIS software. The specification utilizes standard DWG/DXF data structures to define schema, store data, and define a geospatial coordinate system.

Copyright 2008 ESRI All rights reserved. Printed in the United States of America. The information contained in this document is the exclusive property of ESRI. This work is protected under United States copyright law and other international copyright treaties and conventions. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying and recording, or by any information storage or retrieval system, except as expressly permitted in writing by ESRI. All requests should be sent to Attention: Contracts Manager, ESRI, 380 New York Street, Redlands, CA 92373-8100, USA. The information contained in this document is subject to change without notice. U.S. GOVERNMENT RESTRICTED/LIMITED RIGHTS Any software, documentation, and/or data delivered hereunder is subject to the terms of the License Agreement. In no event shall the U.S. Government acquire greater than RESTRICTED/LIMITED RIGHTS. At a minimum, use, duplication, or disclosure by the U.S. Government is subject to restrictions as set forth in FAR 52.227-14 Alternates I, II, and III (JUN 1987); FAR 52.227-19 (JUN 1987) and/or FAR 12.211/12.212 (Commercial technical Data/Computer Software); and DFARS 252.227-7015 (NOV 1995) (technical Data) and/or DFARS 227.7202 (Computer Software), as applicable. Contractor/Manufacturer is ESRI, 380 New York Street, Redlands, CA 92373-8100, USA. ESRI, the ESRI globe logo, ArcCatalog, ArcGIS, ArcIMS, ArcMap, ArcObjects, ArcPad, ArcSDE, ArcToolbox, www.esri.com, and @esri.com are trademarks, registered trademarks, or service marks of ESRI in the United States, the European Community, or certain other jurisdictions. Other companies and products mentioned herein are trademarks or registered trademarks of their respective trademark owners. 2

Contents Introduction... 4 For CAD/GIS Administrators... 5 Understanding the DWG Format... 6 The DWG Database... 6 Manipulating data in a DWG... 7 The MSD Feature Class... 8 Specifications... 9 Coordinate System... 9 Feature Classes... 9 Feature Class... 9 Feature Type... 10 Feature Query... 10 Feature Attributes... 10 Fields... 11 Entity Attributes... 11 DWG Class diagrams... 12 d Object Dictionary... 12 Extension Dictionary... 13 3

Introduction The ESRI Mapping Specification for DWG (MSD) is a standard for coding information in a DWG or DXF file to define GIS feature classes with non-geometric attribution, and the definition of a geospatial coordinate system. Feature classes and the coordinate system defined in a DWG or DXF file using this specification are recognized by ESRI s ArcGIS software as read-only GIS feature classes. The MSD is designed to allow developers and computer-aided design (CAD) software users to store, edit and share GIS content in a DWG or DXF file. This document defines CAD data storage structures that must remain consistent with each implementation. For the remainder of this document DWG refers to both the DWG and DXF formats. The MSD complies with the Autodesk Registered Developer Symbol (RDS) standard. All root-level entries in the d Object Dictionary use the prefix ESRI_ to prevent namespace conflicts with other applications. Developers are permitted to use the ESRI_ prefix as defined in this standard to create an MSD-formatted DWG. MSD-compliant applications can be implemented with AutoLISP, Visual Lisp, the ObjectARX programming environment using C++, C#, and VB.NET, and OpenDWG toolkits. In the ancillary documents you will find example source code used to implement MSD in a variety of development environments. These documents assume the reader has a working knowledge of reading and writing to the DWG and or DXF format. The DWG format is an open standard used for storing and sharing CAD data. Originally developed by Autodesk as a proprietary format for its AutoCAD products, it is widely used in many engineering related organizations. The US and other government contracts often explicitly require that drawing data be stored and delivered in DWG format. The Open Design Alliance (ODA) is a non-profit organization funded by dues from its members. The ODA offers OpenDWG, which does not replace the DWG file format but is instead compatible with the DWG file format. The ODA is committed to maintaining compatibility between the DWGdirect libraries and the DWG file format. The aim of the ODA is to provide its membership libraries that read and write CAD files, such as DWG and DGN, or other formats where appropriate. More information regarding ODA can be found at www.opendesign.com. 4

For CAD/GIS Administrators The ESRI Mapping Specification for DWG (MSD) is an open-source framework for software developers based entirely on the standard DWG/DXF format. It is a non-proprietary specification that defines standardized programming structures and methods for embedding GIS schema, attribute data and a coordinate system into a DWG or DXF file. MSD-compliant DWG files allow organizations to share GIS content between internal and external stakeholders that also adopt MSD. MSD-compliant schema and data can be added to existing drawings without altering existing CAD geometry. A well planned implementation can improve CAD/GIS interoperability with minimal disruption to existing workflows. A DWG application implementing MSD enables CAD users to create feature classes with attribution while at the same time allowing them to define the members of a feature class within a CAD context such as layer(s), line style(s), and color. This can be especially beneficial for mixed GIS and CAD workflows where MSD can be used to leverage existing CAD standards to produce organized CAD feature classes that are useful to ArcGIS users. Beginning with ArcGIS 9.3, ESRI supports MSD-compliant CAD datasets. The ArcGIS Geoprocessing tool EXPORT TO CAD (ArcInfo license only) generates MSD-compliant feature class schema, attributed entities and a coordinate system. This is non-graphical GIS content that requires ArcGIS for AutoCAD or MSDcompliant open-source programming to view or manipulate the data. ArcGIS for AutoCAD is available for download at www.esri.com. 5

Understanding the DWG Format This section is a general overview of the DWG objects and data structures. This information applies to all DWG files and is not exclusive to the MSD. The DWG Database DWG d Object Dictionary Block Table Symbol Tables Objects Dictionaries Xrecords Data Tables Other Objects Entity Extension Dictionary Objects Dictionaries Xrecords Data Tables Other Objects Layer, linetype, style, etc. The DWG file is a database comprised of entities and objects. Entities are the objects with graphical representations such as lines, text, and arcs. They are owned by the block table. The graphical properties associated with entities such as layer, linetype and style are owned by separate symbol tables. Dictionaries are non-graphical container objects that can be defined to store custom data. They accept a variety of other objects such as xrecords, data tables and even other dictionaries in nested form. The d Object Dictionary (NOD) is the parent dictionary that owns all other dictionaries. The DWG automatically creates the NOD. The extension dictionary is used to link arbitrary DWG database objects to entities or other DWG database objects. It stores the handle of a dictionary in the definition of the object or entity. The data is duplicated any time an entity is copied and travels with the entity when inserted into other drawings. Xrecords are used to store arbitrary non-graphical data and are similar to xdata. They are constructed with DXF group codes in the dotted-pair format. They are owned by other objects and can store up to 2GB of information. 6

Manipulating data in a DWG Result buffers are used to access data stored in DWG objects and entities. They can be combined in linked lists for handling objects and entities that contain a variety of data types. They are comprised of two elements: an association code and a value, respectively. The association code is a DXF group code that also specifies the value s data type. DWG implements ranges of DXF codes reserved for specific uses. The following figure shows the result buffer format of an entity containing a string (1), a real (40) number, an Int32 (90) number, and an Int16 (70) number: A selection set filter list is used to create a selection set. It is an array of associated dotted-pairs, each comprised of two elements: an association code and a value, respectively. The DXF code specifies the filter type (e.g. for layer names) and the value s data type. The value specifies the property. Filter lists can specify multiple properties such as object type, object name, and layer name. They can be combined in nested form to select multiple entities and a variety of properties. The following example could be used to select all block inserts named MyBlock on layer XYZ: ((0. Insert ) (2. MyBlock ) (8. XYZ )) String-value properties such as layer names and line types can be combined as a single string separated with commas to create an OR condition. The following example could be used to select all Point entities on layers ABC or XYZ and of line types ByLayer or Center: ((0. Point ) (8. ABC, XYZ ) (6. ByLayer, Center )) DXF Codes for common filters: Code Filter Type 0 (string) - such as Point, Line, Circle and so on. 2 Object name (string) - the table given name such as MyBlock. 6 Line type (string) such as ByLayer, Center, Continuous and so on. 8 Layer name (string) - such as ABC, or XYZ. 60 Object visibility (integer) - 0=visible, 1=invisible. 62 Color number (integer) - numeric index values from 0 to 256. 0 = ByBlock, 256 = ByLayer. For a complete list of DXF type codes and discussion of selection set filter lists refer to the AutoCAD Customization Guide, or the documentation provide with the ObjectARX SDK, or OpenDWG toolkits. 7

The MSD Feature Class This section expands the DWG database diagram to show conceptually how the MSD feature class is organized in the DWG database and the relationships between key components. Examples of attribute values are included to demonstrate how ArcGIS interprets the entity attributes with respect to the schema fieldnames and default values. The MSD feature class schema is stored in the d Object Dictionary. Each feature class is defined with a name, a GIS feature type, a CAD entity filter query, and non-graphical attribute fieldnames with default values. The Feature Type specifies the CAD entity types in GIS terms such as point, polyline, polygon, multipatch, or annotation. It defines the selection set to include multiple DWG entities that qualify as a single GIS feature type. For example, a GIS polyline feature type will include DWG entities such as lines, arcs, circles, ellipses etc. The Feature Query adds an optional property filter to the selection set. This allows for virtually limitless combinations of properties. For example, multiple line styles, layer names, and a color can all be added to the selection set. This permits a single CAD entity to belong to more than one feature class, and new entities to automatically become part of a feature class selection set. Fieldnames and default values define how the non-spatial attributes will be interpreted by ArcGIS. ArcGIS will include all ESRI feature class fieldnames and default values with the CAD feature class unless a matching ESRI attribute fieldname is attached to the CAD entity s extension dictionary. If a valid and matching fieldname is found in the entity s extension dictionary, then ArcGIS will instead use the entity s attribute value. This allows the user to quickly create and manipulate CAD entities without the need to attach attributes if the default values are sufficient. 8

Specifications Coordinate System Optional d Object Dictionary Xrecord (3. ESRI_PRJ ), string (1. <Coordinate System>),string The coordinate system is used by ArcGIS as a spatial reference and does not influence CAD program behavior. It is a text string in the Well-Known Text (WKT) format analogous to the ESRI PRJ file. PRJ files continue to be supported and will override the internally stored MSD coordinate system. Alternatively this string can now be embedded in the DWG within the NOD and will be honored if no companion.prj file is present. Feature Classes Required d Object Dictionary Dictionary (3. ESRI_Features ), string (3. <feature class name>), dictionary ESRI_Features is the parent dictionary for all ESRI feature classes. Feature Class Required ESRI_Features dictionary Dictionary (3. <feature class name>), string (3. Feature Query ), xrecord (3. Feature Type ), xrecord (3. ESRI_Attributes ), dictionary Feature class schema is used by ArcGIS to translate CAD feature classes and filter entity attributes. 9

Feature Type Valid feature types Required <feature class name> dictionary Xrecord (3. FeatureType ) (1. <feature type>), string Point, Polyline, Polygon, Multipatch, Annotation The feature type defines the selection set to include multiple DWG entities that qualify as a single GIS feature type. Refer to the ArcGIS Help system for a complete mapping of CAD entities to ArcGIS feature types. Feature Query Valid selection set filters Optional <feature class name> dictionary Xrecord (3. Feature Query ), string (<DXF code>. <property>), varies/unlimited Consult MSD and DWG documentation The feature query adds an optional property filter to the feature type selection set. If the feature query is not defined, ArcGIS will include all entities specified by the GIS feature type. It is recommended that the feature type be excluded from the feature query unless a specific application requires this parameter for redundancy. Caution: Conditional operators are not currently supported by ArcGIS or the opendwg libraries. Alternatively, use comma delimited strings to create the OR condition for string-value properties such as layer names and line types. Feature Attributes Optional <feature class name> dictionary Dictionary (3. ESRI_Attributes ), string (3. <fieldname>), dictionary ESRI_Attributes is the parent dictionary for all ESRI feature class attributes. 10

Fields Valid DXF parameters Optional string parameter Optional ESRI_Attributes dictionary Xrecord (3. <fieldname>), string (<DXF code>. <default value>), xrecord 1. string, 40. real, 70. int16, 90. int32 (90. <string length>), integer Fieldnames and default values define the default CAD feature class attribute values read by ArcGIS. Entity Attributes Optional Entity Dictionary (3. ESRI_Attributes ), string (3. <fieldname>), dictionary ESRI_Attributes is the parent dictionary for all ESRI feature class attributes. Entity attributes are used to store field values directly on an entity when the user requires attribute values that differ from the default values defined in the schema. The specification for entity attributes is identical to the specification for attributes defined in the NOD schema. The only difference is they are stored in the entity s extension dictionary. The extension dictionary stores the handle of the ESRI_Attributes dictionary in the definition of the entity. 11

DWG Class diagrams d Object Dictionary 12

Extension Dictionary 13