Semantic Translation Part 7: Translation Models in GIS
Geoprocessing (GP) model tools are similar, in that they have an input and are a collection of basic tools that are organized to produce a desired output. Just like skilled and well-coached basketball players, the result of a well-constructed geoprocessing tool will be a useful and predictable output.
You ArcGIS users can download, the GP Polygon Topology Checker for CAD. I have created this geoprocessing model that will take as input a CAD file and create polygons from lines with TEXT used to identify the resultant polygons. The acceptable input is not any CAD file, but rather a CAD file where the CAD file is drawn with a network of lines that depict polygon boundaries, and has a single identifying TEXT element within the visual boarders.
A GP model tool like this one, is a collection of other GP tools, all with an input and output. GP tools combine to create models, which are in turn considered tools themselves, which can be combined in other models or scripts to create other tools and so on and so on… This model uses a collection of basic system tools. The primary tool of this model is the FEATURE TO POLYGON tool. It assembles polygons from lines and uses point or annotation type features as identifying attributes. There are a couple of sample models in the CAD Translation Sample toolbox that perform a similar operation. What makes this model different is that it compares the output polygons to the input lines to determine if there may have been linear geometry or label errors.
- Build polygons from CAD lines an text.
- Find line geometry errors (undershoots and overshoots)
- Identify missing labels
- Identify duplicate labels
- Identify orphan labels
- Report all errors back to a copy of the original drawing.
The idea of this workflow is that the errors are not only found or repaired, but that they reported back in a CAD format so that the CAD users can view the errors make decisions about how they should be mitigated, thus improving the quality of both the CAD data and the resulting GIS data.
There are a host of tools in ArcMap that deal specifically with GIS topology, creation and management. What makes this tool different is that these are Geoprocessing tools that can be run in a script or from ArcCatalog as part of a QA/QC or automated semantic translation routine. Furthermore the results of the analysis don’t modify the GIS data, but rather push the data back to CAD for modification there.
The model is documented with help and with descriptive ModelBuilder labels. The basic logic is as follows: The user selects and input CAD file that was drawn with a structure for which this tool was designed. The boundary lines and label text are queried from all the other content of the drawing and are used to create polygons. The original lines are then compared to the resultant GIS polygon boundaries. Using a very small BUFFER of the original lines and a tool called ERASE, the buffered lines are used as a stencil or stamp to compare against the original CAD lines. All of the geometry common to both is removed, the difference remains. That data is then output to the CAD file as potential errors. The resultant polygons will have the attributes of the labels that were found within the inferred boundaries. A comparison of all the input labels can be made with the newly formed polygons using IDENTITY. Creating a FREQUENCY report of those original labels compared to the new polygons can be used to find polygons that have more than one label point. Likewise those points that are not found within any polygon are evident. Lastly a direct query of the resultant polygons can determine those polygons that had no label point.
All of this model's queries and processes result in GIS feature classes that can then be exported back into a CAD format. Using the ArcGIS-ArcInfo EXPORT TO CAD tool the entire original CAD file can be used as a seed file to which the potential geometry errors can be added. The errors will be placed on descriptively named CAD layers to help assist in the easy navigation to the potential errors by the CAD operators using their CAD application.