在一个要素类中查找重叠要素

2024-04-19 05:13:45 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试识别一个要素类中的重叠要素。作为一个Searchcursor,这段代码工作得很好,但是当我转换为update cursor时,当当前更新(e1[1])被称为。你知道吗

    with arcpy.da.UpdateCursor(in_features, ["SHAPE@", "Working_comments"]) as cur:
        for e1,e2 in itertools.combinations(cur,2):
            if e1[0].overlaps(e2[0]):
               e1[1] = "overlaps"
            cur.updateRow(e1[1])

Tags: 代码inwithupdatecursorda要素features