Skip to main content

Feature Compare (Data Management Tools)

Summary

Compares two feature classes or layers and returns the comparison results.

Usage

  • This tool returns messages showing the comparison result. By default, the tool will stop running after encountering the first difference between the inputs. To report all differences, check the Continue Comparison parameter.

  • If the differences reported between the input datasets are due to the addition or deletion of records, only the first reported difference is valid. All reported differences after the addition or deletion will be due to the comparison being out of sequence. The compare tools do not attempt to find the next set of matching records after an added or deleted record is encountered.

  • This tool can report differences in geometry, tabular values, spatial reference, and field definitions.

  • Multiple sort fields can be specified. The first field is sorted, the second field is sorted, and so on, in ascending order. Sorting by a common field in both input datasets ensures that you are comparing the same row from each input dataset.

  • By default, the Compare Type parameter is set to All. This means all properties of the features being compared will be checked, including the spatial reference, field properties, attributes, and geometry. Specify a different compare type to compare specific properties of the features.

  • The Ignore Options parameter provides the flexibility to omit properties such as measure attributes, z-attributes, point ID attributes, and extension properties. Two feature classes may be identical, yet one has measures and z-coordinates and the other does not. The Ignore extension properties option refers to additional information added to a feature class or table. For example, the features of two annotation feature classes can be identical, but the feature classes may have different extension properties, such as different symbols in the symbol collection and different editing behavior.

  • The default XY Tolerance parameter value is determined by the default xy-tolerance of the Input Base Features parameter value. To minimize error, the value used for the compare tolerance should be as small as possible. If a value of 0 is specified, an exact match will be performed.

  • The default M Tolerance and Z Tolerance parameter values are determined by the default m-tolerance and z-tolerance of the Input Base Features parameter value. The units are the same as those of the Input Base Features parameter value. If a value of 0 is specified, an exact match will be performed.

  • When using the Geometry only option for the Compare Type parameter, the spatial references must match. If the spatial references for the inputs are not the same, a difference between the inputs will be reported. If the coordinate systems for the inputs are not the same, the features will be considered different. This tool does not project features on the fly.

  • The Omit Fields parameter is a list of fields that will not be included in the field count comparison—their field definitions and tabular values are ignored.

  • Attribute tolerances can only be specified for numeric field types.

  • The Output Compare File parameter value will contain all similarities and differences between the input datasets. This file is a comma-delimited text file that can be viewed and used as a table in ArcGIS. For example, it can be queried to obtain all the object ID values for all the rows that are different. The has_error field indicates that the record contains an error. A value of True indicates a difference.

  • When using this tool in Python, get the status of the comparison from the returned Result object using the index position of 1.(result[1]). The value will be 'true' when no differences are found and 'false' when differences are found.

    Learn more about using tools in Python

Parameters

Label Explanation Data type

Input Base Features

The data that will be compared with the Input Test Features parameter value. This parameter value is data that you have declared valid. This base data has the correct content and information.

Feature Layer

Input Test Features

The data that will be compared with the Input Base Features parameter value. This parameter value is data that you have made changes to by editing or compiling new information.

Feature Layer

Sort Field

The field or fields that will be used to sort records in the inputs. The records are sorted in ascending order. Sorting by a common field in both inputs ensures that you are comparing the same row from each input dataset.

Value Table

Compare Type

(Optional)

Specifies the comparison type that will be used.

  • AllAll properties of the feature classes will be compared. This is the default.

  • Geometry onlyOnly the geometries of the feature classes will be compared.

  • Attributes onlyOnly the attributes and their values of the feature classes will be compared.

  • Schema onlyOnly the schema of the feature classes will be compared.

  • Spatial Reference onlyOnly the spatial references of the two feature classes will be compared.

String

Ignore Options

(Optional)

Specifies the properties that will not be compared.

  • Ignore MsMeasure properties will not be compared.

  • Ignore ZsElevation properties will not be compared.

  • Ignore PointIDsPoint ID properties will not be compared.

  • Ignore extension propertiesExtension properties will not be compared.

  • Ignore subtypesSubtypes will not be compared.

  • Ignore relationship classesRelationship classes will not be compared.

  • Ignore representation classesRepresentation classes will not be compared.

  • Ignore field aliasField aliases will not be compared.

String

XY Tolerance

(Optional)

The distance that will determine the range in which features will be considered equal. To minimize error, the parameter value should be as small as possible. By default, the compare tolerance is the xy-tolerance of the input base features.

Linear Unit

M Tolerance

(Optional)

The minimum distance between measures before they will be considered equal.

Double

Z Tolerance

(Optional)

The minimum distance between z-coordinates before they will be considered equal.

Double

Attribute Tolerance

(Optional)

The numeric value that will determine the range in which attribute values are considered equal. This parameter only applies to numeric field types.

Value table columns:

  • FieldThe numeric field that the tolerance will be applied to.

  • ToleranceThe numeric value that determines the range in which attribute values are considered equal. This only applies to numeric field types.

Value Table

Omit Fields

(Optional)

The field or fields that will be omitted during comparison. The field definitions and the tabular values for these fields will be ignored.

String

Continue Comparison

(Optional)

Specifies whether the comparison will continue after encountering the first difference between the inputs.

  • CheckedThe tool will continue after encountering the first difference.

  • UncheckedThe tool will stop after encountering the first difference. This is the default.

Boolean

Output Compare File

(Optional)

The output file that will contain all similarities and differences between the inputs. This file is a comma-delimited text file that can be viewed and used as a table in ArcGIS.

File

Derived output

Label Explanation Data type

Compare Status

The compare status will be 'true' when no differences are found and 'false' when differences are found.

Boolean

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes