laptop and a wrench

漏洞

Using the Intersect_analysis function with a SearchCursor results in duplicate features in ArcMap Python 2.7.14 and Python 3.6.7.

上次发布: March 19, 2019 ArcGIS for Desktop
漏洞 ID 编号 BUG-000119731
已提交January 30, 2019
上次修改时间July 4, 2025
适用范围ArcGIS for Desktop
找到的版本10.6.1
操作系统Windows OS
操作系统版本10.0
修正版本2.9
状态Fixed

解决办法

Use the function outside the SearchCursor and export every feature from the Output to a new feature class or shapefile or use the following code:import arcpymerged = arcpy.CopyFeatures_management("test", arcpy.Geometry())[0]with arcpy.da.SearchCursor('fishnetpoly', ["SHAPE@","OID@"]) as sCursor:    for row in sCursor:        intersect = merged.intersect(row[0], 4)        arcpy.CopyFeatures_management(intersect, "intersected_{0}".format(row[1]))        print ("Intersected " + str(row[1])) 

重现步骤

漏洞 ID: BUG-000119731

软件:

  • ArcGIS for Desktop

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项