【发布时间】:2014-06-06 09:54:54
【问题描述】:
我一直在寻找一种从 python 列表(在下面的例子中为 uniqueList)创建 shapefile 的方法。
基本上,我一直在使用 SearchCursor 来遍历 shapefile,我想将结果导出为 shapefile...我尝试了 CopyFeatures...但它甚至没有返回空白文件(它什么也没返回)。
import arcpy
def find_overlaps(input_features, output_features):
uniqueList = []
for row in arcpy.da.SearchCursor(input_features, ('OBJECTID', 'SHAPE@', 'name')):
foundMatch = False
for row2 in uniqueList:
if row[1].equals(row2[1]):
foundMatch = True
break
if foundMatch == False
uniqueList.append(row)
return uniqueList
## no work ##
arcpy.management.CopyFeatures(uniqueList, output_features)
【问题讨论】:
标签: python-2.7 gis arcgis esri arcpy