返回指定类型的属性列表

import arcpy
… from arcpy import env
… env.workspace = “I:\pystudy\shili”
… fla = arcpy.ListFields(“fydltb.shp”,””,”String “) #返回为文本字段
… for field in fla:
…     print field.name + ”  ” + str(field.length)
…     
FID  4
Shape  0
BSM  9
YSDM  10
TBYBH  8
TBBH  8
DLBM  4
DLMC  60
QSXZ  3
QSDWDM  19
QSDWMC  60
ZLDWDM  19
ZLDWMC  60
GDLX  2
KCLX  2
DLBZ  10
GDPDJ  2
KCDLBM  4
TKXS  19
TBMJ  19
XZDWMJ  19
LXDWMJ  19
TKMJ  19
TBDLMJ  19
PZWH  254
BGJLH  20
BGRQ  8
XZGDJFLY  50
OBJECTID  9
TBMJ_DIST  19
shape_Leng  19
shape_Area  19
 

转载自:https://blog.csdn.net/qq_36196621/article/details/86529226

You may also like...