Find Identical (Data Management)
Reports any records in a feature class or table that have identical values in a list of fields, and generates a table listing these identical records. If the field Shape is selected, feature geometries are compared.
The Delete Identical tool can be used to find and delete identical records.
This tool finds identical records based on input field values. The values from multiple fields in the input dataset can be compared. If more than one field is specified, records are matched by the values in the first field, then by the values of the second field, and so on.
The output table will have the same number of records as the input dataset and will contain two fields: IN_FID and FEAT_SEQ. Identical records have the same FEAT_SEQ value. FEAT_SEQ values are generated by this tool—they have no relationship to object IDs. The IN_FID field can be used to join the output table to the input dataset based on FID.
With feature class or feature layer input, select the field Shape in the Field(s) parameter to compare feature geometries to find identical features by location. The XY Tolerance and Z Tolerance parameters are only valid when Shape is selected as one of the input fields.
The table or feature class for which identical records will be found.
The output table reporting any identical records. This table will have the same number of records as the input dataset and will contain two fields: IN_FID and FEAT_SEQ. Identical records have the same FEAT_SEQ value.
The field or fields whose values will be compared to find identical records.
The xy tolerance that will be applied to each vertex when evaluating if there is an identical vertex in another feature. This parameter is enabled only when Shape is selected as one of the fields.
The z tolerance that will be applied to each vertex when evaluating if there is an identical vertex in another feature. This parameter is enabled only when Shape is selected as one of the fields.
The following Python window script demonstrates how to use the FindIdentical function in immediate mode.
import arcpy # Find identical records based on a text field and a numeric field. arcpy.FindIdentical_management("C:/data/fireincidents.shp", "C:/output/duplicate_incidents.dbf", ["ZONE", "INTENSITY"])
The following stand-alone script demonstrates how to use the FindIdentical tool to identify duplicate records of a table or feature class.
# Name: FindIdentical_Example2.py # Description: Finds duplicate features in a dataset based on location (Shape field) and fire intensity import arcpy from arcpy import env env.overwriteOutput = True # Set workspace environment env.workspace = "C:/data/findidentical.gdb" try: # Set input feature class in_dataset = "fireincidents" # Set the fields upon which the matches are found fields = ["Shape", "INTENSITY"] # Set xy tolerance xy_tol = ".02 Meters" out_table = "duplicate_incidents" # Execute Find Identical arcpy.FindIdentical_management(in_dataset, out_table, fields, xy_tol) print arcpy.GetMessages() except arcpy.ExecuteError: print arcpy.GetMessages(2) except Exception as ex: print ex.args