To learn more about SQL expressions, see Calculate field values. Python 3—The Python expression type will be used. This is the default. Arcade—The Arcade expression type will be used. SQL—The SQL expression type will be used. String Fields The fields that will be calculated, their expre...
To calculate a field to be a numeric value, enter the numeric value in the Expression parameter with no quotation marks around the value. Legacy: arcgis.rand() is no longer supported as of ArcGIS Pro 2.0. Comparable functions using Python's random module should be used instead. To use the...
UsesFieldCalculator+string fieldName+void calculate()PythonScript+string script+void execute() 关系图 下面是字段计算器与相关元素之间的关系图。 FIELDstringNamenumberValueSCRIPTstringCodefunctionExecute()Executes 结尾 通过上述步骤和示例代码,你应该对如何在 ArcGIS 的字段计算器中使用 Python 脚本有了清晰的理解。
arcpy.AddMessage('———添加部件数量———') field = r'部件数量' arcpy.AddField_management(input_fc, field, "LONG") arcpy.CalculateField_management(input_fc, field, "!shape.PartCount!") is_mul = False with arcpy.da.UpdateCursor(input_fc, ['部件数量']) as cursor: for row in cursor:...
Field field True string Select a field Search parameter parameter True string Enter the search parameter Second Field field2 string Select a field Second search parameter parameter2 string Enter the second search parameter Returns Expand table NamePathTypeDescription Geometry object data object...
AddFieldDelimiters() 在字段名称中添加字段分隔符,以便在 SQL 表达式中使用。分隔符类型以工作空间来判断,不论字段是否存在。 SQL 表达式中使用的字段分隔符因所查询数据的格式而异。例如,文件地理数据库(也可以不需要)和 shapefile 使用双引号 (" "),个人地理数据库使用方括号 ([ ]),企业级地理数据库不使用字...
与10.2相比,此工具集增加了用于Pro的分析工具(AnalyzeToolsForPro),取消了合并分支(MergeBranch)、计算值(CalculateValue)、选择数据(SelectData)几个工具。 用于Pro的分析工具(AnalyzeToolsForPro):此地理处理工具可分析 Python 脚本,并为 ArcGIS Pro 不支持的功能自定义地理处理工具。
通过字段计算器为“Type10_20”字段赋值,赋值代码可设置为“[Type2010] + " -> " + [Type2020]”,即可在这一字段中显示土地利用类型的转移方向;通过几何计算(Calculate Geometry)工具计算转移面积,单位建议为公顷[ha],并赋给“Area10_20”字段。
计算字段示例 https://desktop.arcgis.com/zh-cn/arcmap/latest/manage-data/tables/calculate-field-examples.htm 转载自:GIS荟 版权归原作者所有,如有侵权请告知删除 如果亲觉得我们的文章还不错的话,那就请分享转发一下吧! 地信论坛 bbs.3s001.com ...
Unique ID field idField True string Select an unique ID field in the feature layer Delete records deletedIds string A list or single value of IDs used to identify the deleted items. The IDs provided must match the IDs used in the feature layer. Multiple IDs can be added and separate...