操作方法
在 Python 脚本中运行计算几何属性工具时,可能会返回以下错误:
TypeError: CalculateGeometryAttributes() takes from 0 to 5 positional arguments but 6 were given.
在 ArcGIS Pro 2.5 之前,计算几何属性工具仅接受 5 个参数:
in_features, geometry_property, {length_unit}, {area_unit}, {coordinate_system}
在 ArcGIS Pro 2.5 发布后,该工具现在接受 6 个参数:
in_features, geometry_property, {length_unit}, {area_unit}, {coordinate_system}, {coordinate_format}
运行以下代码行时,可以找出该工具接受的版本所用参数的数量:
arcpy.management.CalculateGeometryAttributes.__code__.co_argcount
文章 ID: 000023718
获取来自 ArcGIS 专家的帮助
立即开始聊天