arcpy提取线段/道路起点,终点

# encoding: utf-8nimport arcpyndata=r”D:\删减后的道路网\delbjroad.shp”nls=[]nstrout=””nwith arcpy.da.SearchCursor(data, [“SHAPE@”,”ID”]) as cursor:n    for row in cursor:n        for row in cursor:n         …