Find Identical (Data Management)

Summary

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.

Illustration

Find Identical illustration

Usage

Syntax

FindIdentical_management (in_dataset, out_dataset, fields, {xy_tolerance}, {z_tolerance})
ParameterExplanationData Type
in_dataset

The table or feature class for which identical records will be found.

Table View
out_dataset

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.

Table
fields
[fields,...]

The field or fields whose values will be compared to find identical records.

Field
xy_tolerance
(Optional)

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.

Linear unit
z_tolerance
(Optional)

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.

Double

Code Sample

FindIdentical example 1 (Python window)

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"])



FindIdentical example 2 (stand-alone script)

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[0]


Environments

Related Topics

Licensing Information

ArcView: No
ArcEditor: No
ArcInfo: Yes

10/27/2014