Tolerance (Coverage)

Summary

Sets a coverage's tolerances.

Learn more about how Tolerance works

Usage

Syntax

Tolerance_arc (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.

  • FUZZYSets the Input Coverage's fuzzy tolerance to the value specified in the Tolerance Value. This is the default option.
  • DANGLESets the Input Coverage's dangle length to the value specified in the Tolerance Value.
  • TIC_MATCHSets the tic match tolerance to the value specified in the Tolerance Value.
  • EDITSets the Input Coverage's edit distance to the value specified in the Tolerance Value.
  • NODESNAPSets the Input Coverage's node snap distance to the value specified in the Tolerance Value.
  • WEEDSets the weed tolerance to the value specified in the Tolerance Value.
  • GRAINSets the grain tolerance to the value specified in the Tolerance Value.
  • SNAPSets 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
# Author: ESRI

# 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

Related Topics

Licensing Information

ArcView: No
ArcEditor: No
ArcInfo: Requires ArcInfo Workstation installed

Published 6/8/2010