ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Calculate Default XY Tolerance

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

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.

Legacy:

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

  • This tool cannot be used to reset the value of default XY Tolerance; it can only calculate the XY tolerance value.

  • The result of this tool will be returned as a message from the tool. The values can be viewed in the geoprocessing Results window, or the value can be assigned to a variable in scripting by accessing the tool execution result object.

  • Although the default XY tolerance of non-geodatabase feature classes maybe different depending on the spatial reference, its value is equivalent to 0.001 meter. This default value cannot be changed.

  • The XY tolerance of a geodatabase feature classes can be specified when a new feature class, or its containing feature dataset or topology, is created in a geodatabase. If you do not specify a new XY tolerance, the default values of the containing feature classes are used, which usually is equivalent to 0.001 meter. If the feature class is saved in a topology of a geodatabase, then XY tolerance can be reset using the Set Cluster Tolerance tool. For more information, you can right-click any feature class or dataset and click Properties, then select the Tolerance tab, then check About Setting Tolerance help.

  • Most tools that create new feature classes (such as Create Feature Class or Copy Features) honor the XY Tolerance environment setting. However, only those tools that use this environment will set the XY tolerance on the output feature class. The input XY tolerance will not be affected by this environment setting.

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

  • Current Workspace
  • Scratch Workspace

Licensing information

  • ArcGIS for Desktop Basic: Yes
  • ArcGIS for Desktop Standard: Yes
  • ArcGIS for Desktop Advanced: Yes

Related topics

  • An overview of the Feature Class toolset
  • XY Tolerance (Environment setting)

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal