arcpy获取组成点,线,面要素的坐标

点要素简单就不说了,

线面同理

# encoding: utf-8
import  arcpy
data=r"C:\Users\h\Desktop\nb\Export_Output_2.shp"
with arcpy.da.SearchCursor(data, ["SHAPE@","FID"]) as cursor:
    for row in cursor:
        for pts in row[0]:
            for pt in pts:
                print("{0}, {1}".format(pt.X, pt.Y))

猜你喜欢

转载自blog.csdn.net/A873054267/article/details/86489146
今日推荐