容差 (Coverage)
用法
- 
以下选项不接受零容差值:FUZZY、EDIT、NODESNAP、WEED、GRAIN 和 SNAP。 
- 
如果未指定容差类型,则默认类型为 FUZZY。 
- 
要查看设置了哪些容差以及哪些容差“已校验”,请打开“Coverage 属性”页面,并转到“容差”选项卡。要执行此操作,可右键单击目录 窗口或 ArcCatalog 中的 coverage 名称,然后单击“属性”。 
- 
每执行此工具一次,只会设置一个容差。 
- 
不能使用此工具对未验证的容差进行验证。但如果您使用此工具将现有容差更改为一个更小的值,则已验证的容差仍将保持“已验证”状态。 
语法
Tolerance_arc (in_cover, {tolerance_type}, {tolerance_value})
| 参数 | 说明 | 数据类型 | 
| in_cover | 要设置容差的 coverage。 | Coverage | 
| tolerance_type (可选) | 要设置的容差类型。 
 | String | 
| tolerance_value (可选) | 要为所选选项的容差设置的值。以下选项不接受零“容差值”:FUZZY、EDIT、NODESNAP、WEED、GRAIN 和 SNAP。 | Double | 
代码实例
容差独立脚本 
 
以下独立脚本演示了如何使用“容差”工具。该脚本使用 Describe 检查工作空间中所有 coverage 的容差。如果所有容差都不符合预先确定的标准,该脚本将使用“容差”工具来更新这些容差。
# 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)
相关主题
许可信息
ArcGIS for Desktop Basic: 否
ArcGIS for Desktop Standard: 否
ArcGIS for Desktop Advanced: 需要 已安装 ArcInfo Workstation
5/10/2014