Available with Advanced license.
Summary
Sets a coverage's tolerances.
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
Tolerance_arc (in_cover, {tolerance_type}, {tolerance_value})
Parameter | Explanation | Data Type |
in_cover | The coverage for which tolerances will be set. | Coverage |
tolerance_type (Optional) | The type of tolerance to be set.
| 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
Licensing Information
- ArcGIS for Desktop Basic: No
- ArcGIS for Desktop Standard: No
- ArcGIS for Desktop Advanced: Requires ArcInfo Workstation installed