zoukankan      html  css  js  c++  java
  • 子区域数据合并

    # -*- coding: utf-8 -*-
    # ---------------------------------------------------------------------------
    # mergeSubRegionData.py
    # Created on: 2016-07-27 09:10:17.00000
    # (generated by ArcGIS/ModelBuilder)
    # Description:
    # ---------------------------------------------------------------------------

    # Set the necessary product code
    # import arcinfo


    # Import arcpy module
    import os
    import random
    from itertools import groupby
    import zipfile
    import arcpy

    # Check out any necessary licenses

    # Set Geoprocessing environments
    arcpy.env.overwriteOutput = True

    targetDataset = "E:\guangxi\gxsh.gdb\xian"
    #layerList = ['AGNP','BOUA','DIKL','HFCL','HFCP','HYDA','JCZD','LRDL','LRRL','MXRV','NODE','RESA','RIVL','RVDM','SKUA','SLTA','USLU','WATA','WATL','WSML','WSRL','WSWA','WSWL','XJ']
    #layerList = ['AGNP','BOUA','DIKL','HFCL','HFCP','HYDA','JCZD','LRDL','LRRL','MXRV','NODE','RESA','RIVL','RVDM','SKUA','SLTA','USLU','WATA','WATL','WSML','WSRL','WSWA','WSWL','XJ']
    layerList = ['SKUP']
    path = "E:\guangxi\output0"
    currentFiles = os.listdir(path)

    '''
    for fileName in currentFiles:
    print("-----------------------------------"+fileName+"-----------------------------------")
    for layerName in layerList:
    shpfileName = path + "\" + fileName + "\"+layerName+".shp"
    targetLayer = targetDataset + "\"+layerName
    print(targetLayer)
    arcpy.Append_management(shpfileName, targetLayer, "TEST","","")
    '''


    for layerName in layerList:
    print("-----------------------------------"+layerName+"-----------------------------------")
    for fileName in currentFiles:
    shpfileName = path + "\" + fileName + "\"+layerName+".shp"
    if not os.path.exists(shpfileName):
    continue
    targetLayer = targetDataset + "\"+layerName
    print(shpfileName)
    #arcpy.Append_management(shpfileName, targetLayer, "TEST","","")
    arcpy.Append_management(shpfileName, targetLayer, "NO_TEST","","")
    print("OK")


  • 相关阅读:
    CNN的学习记录
    softmax和softmax loss的学习记录
    Vue2.0 生命周期
    Vue methods 方法
    Vue2.0 全局操作 Vue.set
    Vue2.0 自定义指令 vuedirective
    Vue2.0 构造器的延伸 Vue.extend
    vue computed
    vuecli 脚手架分析
    h5表单介绍与案例
  • 原文地址:https://www.cnblogs.com/gispathfinder/p/5711770.html
Copyright © 2011-2022 走看看