arcpy如何只获取面要素外环坐标点?

arcgis帮助文档上面所有节点都会读取出来,怎么把代码更改才能只获取外环的节点呢?
 
import arcpy
 


infc = arcpy.GetParameterAsText(0)

# Enter for loop for each feature
#
for row in arcpy.da.SearchCursor(infc, ["OID@", "SHAPE@"]):
    # Print the current multipoint's ID
    #
    print("Feature {0}:".format(row[0]))
    partnum = 0

    # Step through each part of the feature
    #
    for part in row[1]:
        # Print the part number
        #
        print("Part {0}:".format(partnum))

        # Step through each vertex in the feature
        #
        for pnt in part:
            if pnt:
                # Print x,y coordinates of current point
                #
                print("{0}, {1}".format(pnt.X, pnt.Y))
            else:
                # If pnt is None, this represents an interior ring
                #
                print("Interior Ring:")
        partnum += 1
 
已邀请:

summerchan - 菜鸟giser

赞同来自:

已解决

要回复问题请先登录注册