Calculate Default XY Tolerance (Data Management)

Summary

Calculates a default XY tolerance by examining the spatial reference and the extent of the feature class.

With geodatabase feature classes, the value returned by this tool will be identical to the XY Tolerance property on a geodatabase feature class or dataset, or the cluster tolerance of a topology. With non-geodatabase feature classes such as coverage feature classes, shape files, or CAD feature classes, the value will be based on the default tolerance of the feature class' spatial reference.

LegacyLegacy:

The terms XY Tolerance and Cluster Tolerance are synonymous. You will see the usage of Cluster Tolerance in topology, python script, and ArcGIS prior to the 9.2 Release. The name of this tool (used in scripting) is CalculateDefaultClusterTolerance.

XY tolerance is also available in scripting through the XYTolerance property of a SpatialReference object. A SpatialReference object can be created by describing a feature class.

Usage

Syntax

CalculateDefaultClusterTolerance_management (in_features)
ParameterExplanationData Type
in_features

The feature class for which the default XY tolerance will be calculated.

Feature Layer

Code Sample

Calculate Default XY Tolerance Example (Python Window)

The following Python window script demonstrates how to use the Calculate Default Cluster Tolerance function in immediate mode.

import arcpy 
from arcpy import env
env.workspace = "C:/data"
arcpy.CalculateDefaultClusterTolerance_management("roads.shp")
Calculate Default XY Tolerance Example 2 (Standalone Script)

The following Python window script demonstrates how to use the Calculate Default Cluster Tolerance function in a scripting environment.

# Name: CalculateDefaultClusterTolerance_Example.py
# Description: Calculate the default cluster tolerance of a shape file
# Author: ESRI

#Import the system modules
import arcpy
from arcpy import env

env.workspace = "C:/temp"

#Set local variables
shapefileName = "linefc.shp"

arcpy.CalculateDefaultClusterTolerance_management(shapefileName)

Environments

Related Topics

Licensing Information

ArcView: Yes
ArcEditor: Yes
ArcInfo: Yes

10/27/2014