A Python Toolbox (.pyt) extension designed specifically for ArcMap 10.x. This tool dramatically speeds up GIS Data Quality Control (QC) by rigorously validating Shapefile attribute combinations against standard relational schemas defined in Excel.
- Relational Combination Validation: Unlike standard checkers that evaluate fields independently, this tool enforces cross-column combination rules. It checks if
Column_A,Column_B, andColumn_Cmake mathematical sense together horizontally, based precisely on what is allowed in your Excel rows. - Dynamic Field Mapping: Automatically loads Excel headers directly into the ArcMap Geoprocessing interface, allowing you to explicitly map shapefile abbreviations (like
CLASSID) to standard spreadsheet columns (likeClassification Type). - Spatial Error Output (Point Generation): Stop reading spreadsheets to find missing commas. The tool outputs a Point Shapefile marking the exact geographical center of any broken polygon/feature.
- Fact-Based Reporting: Captures and reports exactly what is wrong. The output shapefile and a generated
.txtreport log the raw, physical data that triggered the mismatch so you never have to blindly guess. - Encoding Defenses: Heavily guarded against standard GIS input typos (like trailing spaces, non-breaking whitespaces, and upper/lower case disparities).
- Clone or download this repository.
- In ArcMap, open the Catalog window.
- Navigate to the folder where you downloaded
AttributeChecker.pyt. - Right-click the
.pytfile and click Refresh to ensure ArcMap loads the latest memory cache. - Expand the Toolbox and double click General Check Shapefile Attributes to launch the User Interface.
- Input Features: Select your target Shapefile or Geodatabase Feature Class.
- Standardized Excel File: Load your validation criteria (
.xlsor.xlsx). The first row should contain your standardized attribute headers. Every row underneath defines a valid attribute "marriage" (combination). - Manual Field Mapping: Link your Shapefile columns to the Standard columns using the dropdown inputs. If a column shares the exact same name, the tool will automatically attempt to match it.
- Outputs: Pick an output location for your
.txtsummary report, and optionally choose a folder/geodatabase to spawn the generated Error Point Shapefile.
When encountering heavily flawed data, drop the generated Error Shapefile into your ArcMap Table of Contents on top of your working data.
Use the built in ArcMap Identify Tool (the i icon) and click any of the exported red error points. Look at the ERR_DETAIL attribute—it will explicitly print the data permutation that broke the rules (e.g. SHP RECORDED: TYPE: 'RESIDENTIAL' | SUBTYPE: 'SINGLE FAMILY').
- ESRI ArcMap 10.x (Tested favorably on ArcMap 10.8)
- Standard Arcpy library (Python 2.7)