总结两种方法实现:将面要素类的所有节点信息,按节点顺序存储在属性表的字段中
一种是使用字段计算器的python代码块,在网上找到了实现代码,但在运行中报如下错误,最后确定原因在于所添加的字段长度不够导致的:
首先需要通过add field添加一个string类型的字段,注意:字段长度必须足够大(如果面的节点很多),修改如下截图中Length值。
然后右键字段打开字段计算器,勾选显示代码块,如下截图所示:
代码块内容如下:
def MySub(feat):
partnum = 0
#multipart feature
partcount = feat.partCount
pntcount = 0
str=''
# Enter while loop for each part in the feature (if a singlepart feature
# this will occur only once)
while part