当前位置:   article > 正文

PYTHON-arcgis的开发:批量操作字段_arcpy.calculatefield_management 全部换成变量

arcpy.calculatefield_management 全部换成变量
#添加arcpy包,这个步骤必不可少
import arcpy
... from arcpy import env
... env.workspace = "D:/资料集/123.gdb"
##########################################################################
... fcList = arcpy.ListFeatureClasses()
... for sf in fcList:
##########################################################################
...     arcpy.AddField_management(sf, "date", "TEXT", 9, "", "", "发震日期", "NULLABLE", "NON_REQUIRED")
...     arcpy.AddField_management(sf, "time", "TEXT", 9, "", "", "发震时刻", "NULLABLE", "NON_REQUIRED")
...     arcpy.AddField_management(sf, "name", "TEXT", 18, "", "", "地震名称", "NULLABLE", "NON_REQUIRED")
...     arcpy.AddField_management(sf, "major_axis", "LONG", 9, "", "", "长轴长度", "NULLABLE", "NON_REQUIRED")
...     arcpy.AddField_management(sf, "minor_axis", "LONG", 9, "", "", "短轴长度", "NULLABLE", "NON_REQUIRED")
...     arcpy.AddField_management(sf, "direction", "TEXT", 9, "", "", "长轴方向", "NULLABLE", "NON_REQUIRED")
...     arcpy.AddField_management(sf, "epicenter", "TEXT", 9, "", "", "烈度",
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/weixin_40725706/article/detail/228169
推荐阅读
相关标签
  

闽ICP备14008679号