# encoding: utf-8
import os
import arcpy
from arcpy import env
path=r"D:\data\polygon"
dl=r"D:\data"
for fc in os.listdir(path):
    if(fc.endswith(".shp")):
        fcname=fc.decode('GBK').encode('utf-8')
        polygonpath=path+"\\"+fcname
        print polygonpath
        dlpath=dl+"\\"+fcname[0:len(fcname)-4]
        print dlpath
        env.workspace=dlpath
        features=arcpy.ListFeatureClasses()
        for fea in features:
                if(fea!="边界.shp"):
                    arcpy.Near_analysis(polygonpath, fea)

                    print fea
目录结构

arcpy批量近邻分析,不同的道路

 

相关文章:

  • 2022-12-23
  • 2021-11-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-15
  • 2021-10-15
  • 2022-12-23
猜你喜欢
  • 2021-12-14
  • 2022-12-23
  • 2021-12-12
  • 2021-07-29
  • 2022-12-23
  • 2021-10-05
  • 2021-08-18
相关资源
相似解决方案