Organizing CAD Data In ArcGIS: Part 5/7 Definition Query
In the last post I changed the default symbology in the CAD feature layer. In this way I could distinguish between different CAD features based upon the way they look. However, if I want to independently control, for example, the visibility all the water lines in a CAD drawing separate from the right-of-way lines that are also displayed in the same drawing, I need a separate ArcMap feature layer to represent just the water lines in the Table of Contents. Or, I may want to use ArcGIS spatial analysis tools to check setback distances from the right-of-way lines.
I wrote in a previous post that a CAD drawing is treated as a spatial database in ArcGIS. To make sense of the raw data in this type of database it is useful to create custom views that organize data in useful ways. These database VIEWS may include the joining of tables, and filtering of data to see a useful subset of the entire database. In ArcGIS a spatial database VIEW is most analogous to an ArcMap Feature Layer. When you add a CAD feature class or any feature class to ArcMap an ArcMap feature layer is created in the ArcMap TOC (Table of Contents). The data source for the feature layer is the feature class. You can have multiple feature layer entries in the TOC that all point to the same feature classes.
ArcMap feature layers can have their own display name. Feature layers including CAD feature layers, support table joins and a definition query. The definition query allows you to filter the source feature class and include just those features that satisfy the definition query. I add the CAD POLYLINE feature class multiple times and then rename the feature layer to represent the different systems within a single CAD file. I supply different definition queries to isolate each different data system in the CAD file for example:
LAYER = “WATER”
Using the CAD POLYLINE feature class as the source data to multiple feature layers I include definition queries to assemble a collection of independent data systems rather than a single collection of all the linear features in the drawing.
Use the ADD DATA tool to add the same CAD feature class multiple times to your ArcMap map. You can rename an ArcMap feature layer on the General Tab of the Properties dialog box. Renaming the feature layer give you a chance to describe the contents of your filtered data; a name like Water Lines. The definition query is entered on the Definition Query Tab of the same Properties dialog box. The the definition queries created in this way are only stored within the current ArcMap document (.MXD).