The Export Topology Errors geoprocessing tool, which is new in ArcGIS 10.1, creates feature classes from the current errors in a geodatabase topology. The resulting feature classes contain the error geometries along with attributes about the topology rule that was violated, which features are causing the error, and whether the error has been marked as an exception. Because topology is a special type of layer, it has limited capabilities in comparison to regular layers. However, the outputs of the Export Topology Errors tool are standard feature classes, which enable me to select the error shapes interactively or through a query, use those geometries for subsequent spatial queries, and share the errors with other users. In this post, I will discuss how to use the tool and workflows it allows me to perform.
Prior to ArcGIS 10.1, a similar command was available as an add-on developer sample, but the Export Topology Errors tool is fully supported and integrated with the geoprocessing environment. The tool can be run as a regular geoprocessing tool, from a ModelBuilder model, or through Python scripting.
Running the Export Topology Errors tool
I have imported some CAD lot lines and parcel polygons into a geodatabase and added them to my map that already contains layers for subdivision blocks, roads, and other features. Because spatial integrity measures were not used consistently when the CAD data was created, there are many locations where the lot lines do not connect to each other, intersect improperly, or overlap themselves. I applied topology rules to find line errors, as well as to check for gaps and overlaps among the parcel polygons. The topology found over 100 line dangle errors, 60 polygon gap errors, and a handful of violations of the other rules. I am going to use the Export Topology Errors tool to create new feature classes containing shapes and attributes of these errors.
In a topology layer, errors can be represented as points, lines, or areas and may not be the same type of geometry as the origin features causing the topology errors. For example, the Must Not Have Dangles rule for lines produces a topology error that is a point where the line does not connect, the polygon rule for Must Not Have Gaps is depicted as a line error around the gap, and the polygon rule for Must Not Overlap yields an area in the overlap. When the Export Topology Errors tool is run, only the error shapes are copied to the output feature classes; the origin features causing the errors are not included.
The Export Topology Errors tool is located in the Topology toolset in the Data Management toolbox. The tool requires an input topology, an output location for the new feature classes, and a base name that will prefix the name of the new feature classes. The default base is the name of the topology, but the base name parameter allows me to specify unique names for the output in case I run the tool multiple times and store the outputs in the same geodatabase. New feature classes are automatically created for all three topology error geometries, even if the output has no features.
After the tool runs, I can examine the outputs features and their attributes. The attribute table includes a field for the origin feature class or subtype, the ID of the feature involved, the destination feature class or subtype and feature ID (when applicable), the description of the topology rule that was violated, and whether the topology error has been marked as an exception (which is a valid case of an error). The Exceptions field is numeric, where 0 represents an error and 1 is an exception.
The exported feature classes are one-time snapshots of the topology at the instant the tool runs and are not connected back to the topology or origin features. For example, if I update a value in the exported errors’ attribute table to indicate that an error is a valid exception, the error will still be an error in the actual topology.
Performing selections on the exported topology errors
Topology layers are not selectable, but the outputs of the Export Topology Errors tool are standard layers that support selections. I can use the interactive selection tools as well as the Select By Location and Select By Attributes commands to investigate the errors and compare them to the original feature classes.
Using Select By Location, I can overlay the exported errors with the origin feature classes to identify where the error features are located in relation to the actual features causing the errors. As I look at the Lots_Topology_line errors, it appears that many of them are located around the outside borders of subdivision blocks and should be considered exceptions. What I really want to find are the small gaps in between polygons that are genuine errors. I can use a series of Select By Location queries to do this.
First, I select features in the Lots_Topology_line layer that share a boundary with the Parcels layer to locate the errors caused by the parcel polygons. Because I have a layer in my map representing subdivision block boundaries, I can then select from the selected errors to find only the lines that overlap the block features and are probably exceptions. Therefore, because the features that are not currently selected should represent errors that are not around the outside border, I can switch the selection so only errors that should be examined further are selected. I can then work through each error to determine if there is truly an incorrect void between polygons that needs to be filled.
Because the exported topology errors are actual features, they also have lengths and areas that can be queried. To identify very small line errors that could be simple digitizing mistakes, I can use Select By Attributes to find lines with a length less than a certain value. In my case, any feature with a length less than 10 feet is probably incorrect, but any longer feature should be evaluated with more consideration.
To find these short features, I use Select By Attributes to select features from the Lots_Topology_line layer having a Shape_Length less than 10. This query selects three lines, all of which are from the Must Not Overlap rule and have lengths less than 0.004 feet. When comparing these to the original Lot lines features, these are clearly digitization errors that can easily be merged into the longer features.
Similarly, I could perform a query on the exported area errors to find very small Shape_Area values to find polygons that could be merged into neighboring features.
Sharing the exported topology errors with other editors
By exporting the errors, I can share the contents of the topology with other editors, including those who may not have access to the actual topology or original data. Although editing feature classes in a topology is limited to ArcGIS for Desktop Standard (ArcEditor) and ArcGIS for Desktop Advanced (ArcInfo) licenses, the Export Topology Errors tool is available to all license levels and produces output feature classes that can be edited by anyone. After exporting the topology errors and a copy of the original datasets without the topology (and any other higher-level geodatabase functionality), any editor can make updates.
I sent a geodatabase containing the exported errors and copies of the origin feature classes to one of my team’s editors who is using an ArcGIS for Desktop Basic (ArcView) license. She is able to find the errors and work through each issue without using the actual topology. For example, she can fix a Must Not Overlap error by merging polygons together or resolve a Must Not Have Dangles line error by snapping lines properly. After she finishes her edits, I can reintroduce the updated feature classes into the main geodatabase and use my Standard or Advanced license to rebuild the topology, check for remaining errors, and repeat the sharing process as needed.
Commenting is not enabled for this article.