ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS 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
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Tolerance

Available with Advanced license.

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

Summary

Sets a coverage's tolerances.

Learn more about how Tolerance works

Usage

  • A Tolerance Value of zero will not be accepted for the following options: FUZZY, EDIT, NODESNAP, WEED, GRAIN, and SNAP.

  • If no Tolerance Type is specified, the default type is FUZZY.

  • To see which tolerances have been set and which are Verified, open the Coverage Properties page and go to the Tolerances tab. To do this, right-click the coverage name in the Catalog window or ArcCatalog and click Properties.

  • Only one tolerance is set for each execution of this tool.

  • Unverified tolerances cannot be verified with this tool. However, if you are using the tool to change existing tolerances to a smaller value, verified tolerances will remain verified.

Syntax

arcpy.arc.Tolerance(in_cover, {tolerance_type}, {tolerance_value})
ParameterExplanationData Type
in_cover

The coverage for which tolerances will be set.

Coverage
tolerance_type
(Optional)

The type of tolerance to be set.

  • FUZZY —Sets the Input Coverage's fuzzy tolerance to the value specified in the Tolerance Value. This is the default option.
  • DANGLE —Sets the Input Coverage's dangle length to the value specified in the Tolerance Value.
  • TIC_MATCH —Sets the tic match tolerance to the value specified in the Tolerance Value.
  • EDIT —Sets the Input Coverage's edit distance to the value specified in the Tolerance Value.
  • NODESNAP —Sets the Input Coverage's node snap distance to the value specified in the Tolerance Value.
  • WEED —Sets the weed tolerance to the value specified in the Tolerance Value.
  • GRAIN —Sets the grain tolerance to the value specified in the Tolerance Value.
  • SNAP —Sets the Input Coverage's general snapping distance to the value specified in the Tolerance Value.
String
tolerance_value
(Optional)

The value to be set for the selected option's tolerance. A Tolerance Value of zero will not be accepted for the following options: FUZZY, EDIT, NODESNAP, WEED, GRAIN, and SNAP.

Double

Code sample

Tolerance stand-alone script

The following stand-alone script demonstrates how to use the Tolerance tool. The script uses Describe to check the tolerances on all the coverages in a workspace. If any don't match a predetermined standard, it uses the Tolerance tool to update them.

# Name: Tolerance_Example.py
# Description: Checks/updates tolerances on all coverages in a workspace.
# Requirements: ArcInfo Workstation

# Import system modules
import arcpy
from arcpy import env

# Set environment settings
env.workspace = "C:/data"

# set the tolerance standards
fuzzyValue      =    1.0
dangleValue     =    0.0
tic_matchValue  =    0.0
editValue       =  100.0
nodesnapValue   =   10.0
weedValue       =   10.0
grainValue      =   10.0
snapValue       =   10.0

coverageList = arcpy.ListDatasets("*", "coverage")

for cov in coverageList:
    desc = arcpy.Describe(cov)

    if desc.tolerances.fuzzy <> fuzzyValue:
        arcpy.Tolerance_arc(cov, "fuzzy", fuzzyValue)

    if desc.tolerances.dangle <> dangleValue:
        arcpy.Tolerance_arc(cov, "dangle", dangleValue)

    if desc.tolerances.ticmatch <> tic_matchValue:
        arcpy.Tolerance_arc(cov, "tic_match", tic_matchValue)            

    if desc.tolerances.edit <> editValue:
        arcpy.Tolerance_arc(cov, "edit", editValue)            

    if desc.tolerances.nodesnap <> nodesnapValue:
        arcpy.Tolerance_arc(cov, "nodesnap", nodesnapValue)           

    if desc.tolerances.weed <> weedValue:
        arcpy.Tolerance_arc(cov, "weed", weedValue)            

    if desc.tolerances.grain <> grainValue:
        arcpy.Tolerance_arc(cov, "grain", grainValue)            

    if desc.tolerances.snap <> snapValue:
        arcpy.Tolerance_arc(cov, "snap", snapValue)

Environments

  • Current Workspace
  • Level Of Comparison Between Projection Files
  • Precision For Derived Coverages
  • Precision For New Coverages
  • Scratch Workspace

Licensing information

  • Basic: No
  • Standard: No
  • Advanced: Requires ArcInfo Workstation installed

Related topics

  • Build
  • Clean
  • Index Item
  • Renumber Nodes
  • An overview of the Tolerances toolset

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal