Category: Tips & Tricks

Losing Your Religion: Interoperability with AutoCAD Map 3D and ESRI

I’ve been speaking at conferences for several years about CAD and GIS interoperability. It’s one of those topics where there’s a lot of interest and a lot of misinformation. Or at least, it seems to be much more difficult than it really is. I’ve been moving data between both systems for years, with very few real challenges. What I’ve found, is that the real issue is not the technical aspect of moving data back and forth, but the differences in how the software is generally used. AutoCAD (and other CAD systems) are primarily used for doing design work, and GIS (ostensibly ESRI, but it could be any GIS system) is primarily used for managing as-built facilities and systems. The real challenges are working between the design and as-built management processes. In other words, the issue isn’t CAD to GIS, the issue is Design to As-Built.

I’m going to make several blogs here in a series of the issues and some methods to make the process easier. This first post, I’m going to discuss the a bit about the similarities in the technologies. Following that, I’ll be posting on the differences, barriers, myths, and other issues involved.

Both AutoCAD and ESRI are built on basic primitive elements that are combined to create representations of real objects. Both systems include:

Points - a representation of a single location. It could represent a physical object such as a pole, manhole or brass cap in the ground, or it could be a non-physical point, such as a crime scene location or the corner of a property line. In any case, the systems both record a coordinate consisting of an X and a Y and possible a Z (if elevations are being included). The X and Y value could represent any projection or coordinate system, such as degrees of latitude and longitude or northings and eastings from a state plane.

Point

Lines – a representation of of a connected set of coordinate pairs. Every line is going to have a start point defined by X, Y and/or Z, and and end point defined by an X, Y and/or Z. It could represent the centerline of a road, the edge of a building, or a buried pipe.

Line1

The line may be defined the system by coordinate pairs, such as point A and point B, or it could have the actual coordinate values in the line definition, such as this example from AutoCAD (a listing of a line – the start point is the set of parenthesis with the 10 X Y Z, and the end point is 11 X Y Z):

AutoCAD Line

In some cases, for example, ESRI, the actual coordinates of the line are stored within an object “envelope”, which is a rectagle enclosing the object.

Line2

 Polygons – a representation of an area. It could be a representation of a parcel, a building footprint, or an animal migratory zone. It is defined by lines and so by a series of bounding coordinates. Generally, in vector systems (save that discussion for another time), polygons are defined by their boundaries. They could be defined by groups of lines, or it could have the coordinate values built into the definition, simlar to the lines (as shown above).

polygon1

In ESRI, the coordinate pairs are contained in an envelope bounding the entire object:

polygon2

Attributes -  data associated with an object. Associated data could be an identification number, a name, a description of the object, the color, size, diameter, etc. This is what turns a simple point, line or polygon into a representation of a fire hydrant, electric line or county. Attributes may be stored and linked to the object in a myriad of methods. It could be based on a common identifier stored in the object definition and the attribute list, as in a primary-foreign key relationship, or the definition of the object may be created to include certain atribute sets intrinsically. In some cases there may be a mixture of methods. For example, in AutoCAD, objects have intrinsic attributes (such as blocks attributes), extended entity data (attribute values associted to an individual object), or object data (data tables stored internally in the drawing and linked to objects). Additionally, both systems include methods to link objects to externally associated databases to extens the attributes of an object.

objectdata
Understanding these similarities is key to understanding how to integrate these two systems. The next post, I’ll discuss the primary differences between the two.

Breaking Out of the DWG

Professionally, I’ve always been square on the fence between CAD and GIS. The funny thing is that GIS folks always call me a CAD guy, and the CAD guys always call me a GIS guy. Personally, I’ve always believed in using the right tool for the job, regardless of the technology. The best part for me is that I learn from both technologies and apply them wherever it fits. One of those “learnings” has been to break free from the DWG in AutoCAD Map.

Traditionally, when working in AutoCAD, we work in a drawing. The drawing maintains the model as well as any associated annotation, labeling, details, etc. At most we’ll have a group of drawing files, and some external references to share drawings. It’s much like using Word. We work in documents.

Traditionally, working in a GIS is a bit of a different model. While you have views, or map documents (depending on the particular flavor of GIS) your documents are really little more than a collection of links to data with some instructions on symbolizing the data. It really is more like working in a database, like Access, than in a document.
Both approaches provide benefits, so why not mix them? AutoCAD Map 3D allows me to bridge the gap between technologies. I can use my current drawing file as a pointer to various data sets, while having additional drawing information in my drawing file. For example, I can have my model (the actual drawing representation, whether it be a design of a road, or a city water system) linked from external data sources, and have multiple drawing sheets, complete with one or more title blocks in my current drawing. It allows me to have specific views, sheets or plans with project-specific data and take advantage of permanent data stores that are dynamic and updated each time I open them.
DWG from multiple sources
This allows me to use my enterprise GIS as part of my design tools without having to go through a conversion process. The great part is that it doesn’t really matter what my data source is. I can use other drawings through the attach and query tools, as well as Feature Data Objects (FDO) connectors to systems such as ArcSDE, Oracle or MySQL. I’ll blog more on that GIS-Design integration another time. The point being, is that the individual drawing can lose it’s importance and become essentially a snapshot of your model.

ATTACHED DRAWINGSWhen using drawings as your data source, you can either use the ribbon or the Task Pane (as well as the Classic Menus). On the Ribbon, Attach is right on the Data Panel on the Home Ribbon for both task and tool-based workspaces. The Map Explorer tab in the Task Pane provides a visual of the drawings attached – to access the commands right click on drawings.

FDO data sources can be connected using Connect on the Data Panel in the Home Ribbon as well (next door to the Attach commands), or from the data button at the top of the Task Pane.
FDOConnect
The short story is that you don’t have to be a slave to your DWG file, and treating your DWG as a view to your model, you have some real power to take advantage of a whole new range of possibilities. The great part is that this is not new technology (the FDO process is relatively recent). Map has incorporated this capability since it was acquired.

So, unleash the shackles and get connected.

AutoCAD Map 3D Tip: Data from the Web

One of the challenges for GIS users is finding data, and another is maintaining that data once you find it. Many times, another organization will have a data set that they are willing to share. Getting a copy of the data and incorporating it into your system is a relatively easy process. When that data is regularly being updated, keeping your copy of the data current is another matter altogether. The challenge is greater as the data becomes more dynamic.

Web Mapping Services (WMS – shares image data) and Web Feature Services (WFS – shares feature data) are a way to distribute, and receive data over the web. An organization can publish their data to the web into this format and make their data available to other organizations. Then any authorized user with the right tools can have a live connection to that web data. When data is updated, all of the connected users will have those updates as well.

AutoCAD Map 3D can use both of these services to allow the user to connect to these data sets and make them part of their drawings. The great part is that this data is a connection to live data rather than objects stored in the drawing, so they will not require space in the drawing (the other side of that is that the connection to the data must be live to see the data).

To add this data, you right click on the data icon in the Display Manager tab of the Map Task Pane and select “Connect to Data” (this also works in Civil 3D).

DFTW1

This will open the FDO Data Connect palette. Select Add WMS (or WFS) Connection.

DFTW2

The palette will show boxes to add the connection information.

DFTW3

Add a name for the connection, the web address, and the WMS standard version (which is usually part of the address) and select the Connect button.

DFTW4

Once you are connected, you have the option to select which data (image sets or layers) to add to the map. Select the “add to map” button and the data will appear in the drawing and the feature set will show up in the Display manager.

DFTW5

Now, you have a live connection to the data. You can save the drawing file, and the next time you open it, the connection will be reestablished.
This makes a relatively painless way to share GIS data. The user has immediate access to the data, any changes, and can’t modify the data in any way, but can use it as a part of their geographic data.

In addition, the Open Geospatial Consortium, Inc., a non-profit standards organization, maintains a list of some of these public web-enabled data sets. So next time you’re needing some data, check it out. Someone may have posted just what you need.

MAPIMPORT – Digging in to DGNs

AutoCAD Map 3D includes some additional tools for importing DGN (as well as other file formats) information into AutoCAD. There is a command called MAPIMPORT (you can reach it from the Map menu in the 2009 and earlier products, or from the Map Workspaces in 2010 – or just type MAPIMPORT). It allows you to import all or part of a DGN file. You will have the option to select the levels you want to import, as well as any attribute information. Furthermore, if you are commonly doing the same type of import, you can save the settings for future use. In your case, with a very large file, you may want to import the DGN in smaller parts by selecting groups of levels in the Input Layer section.

 The process works like this – start the MAPIMPORT command. You will get this dialog box:

Mapimport1

 The top section allows you to manage any coordinate information. This is a way to project the source drawing objects into a new coordinate system.

 The Spatial Filter allows you to import drawing objects by selecting an area.

 The Saved Profiles section will allow you to modify how AutoCAD will recognize the source drawing objects, such as how to manage cells:

Mapimport2

 On the initial dialog box, the Input Layer provides a list of the levels present in the DGN file. You can select any or all of the levels you want to import. For large files you want to split up, this is a great way to do that. For Geospatial users building datasets, this is a method to break up the data by thematic groups.

Mapimport3

The Drawing layer is the target AutoCAD layer. You can leave it as the Input Layer, select a layer from the drawing, create a new layer, or create a layer based on one of objects’ data fields from the DGN. Just select the ellipsis (…) at the right (click in the layer box to show it).

Mapimport4

If you are using Map’s Object Classification tools, you can convert imported objects into classes.

You can also convert the DGN’s data fields into AutoCAD Map Object Data as well, even going so far as to map the specific elements to specific Object Data fields.

Mapimport5

At the right of the import properties, you also have some control of how certain insert objects are imported. You can use AutoCAD Points, text (with the value taken from a data field), blocks, and even get attribute values from the data fields.

You can also save this profile you’ve created, so that you can reuse it with other DGNs from the same organization (provided they use consistent standards).

 You can learn all about the tool by starting the command, and clicking the help button on the dialog box. That will take you right to that section of the helps which will explain the tool.

Try it out – it’s a powerful way to work with outside data sources. Try it with files other than DGNs as well. It could save you some time.

Welcome to CADsoft Consulting’s Geospatial blog!

We’re proud to announce the launch of the newest blog in the CADsoft family – Neatline — a Geospatial Conversation, hosted by Rick Chappell.

WordPress Themes