zoukankan      html  css  js  c++  java
  • arcpy搜索和更新要素

    https://gis.stackexchange.com/questions/90372/using-arcpy-da-insertcursor-to-insert-entire-row-that-is-fetched-from-search-cur

    # Get field objects from source FC # dsc = arcpy.Describe(sourceFC) fields = dsc.fields # List all field names except the OID field and geometry fields # Replace 'Shape' with 'SHAPE@' # out_fields = [dsc.OIDFieldName, dsc.lengthFieldName, dsc.areaFieldName] fieldnames = [field.name if field.name != 'Shape' else 'SHAPE@' for field in fields if field.name not in out_fields] # Create cursors and insert new rows # with arcpy.da.SearchCursor(sourceFC,fieldnames) as sCur: with arcpy.da.InsertCursor(targetFC,fieldnames) as iCur: for row in sCur: iCur.insertRow(row)
  • 相关阅读:
    Gym
    Gym
    Gym
    Gym
    Gym
    bzoj 2734: [HNOI2012]集合选数
    bzoj 1068: [SCOI2007]压缩
    HDU 2899 Strange fuction
    hihocoder #1142 : 三分·三分求极值
    HDU 2824 The Euler function
  • 原文地址:https://www.cnblogs.com/geosnoob/p/14503508.html
Copyright © 2011-2022 走看看