How to get the field name for data?
jiaoL06 opened this issue · 1 comments
jiaoL06 commented
What's your question?
when I create the shapefile,such as:
w = shapefile.Writer(shapname)
w.field("name1", "C")
w.linez([data1])
w.record("cross1")
w.field("name2", "C")
w.linez([data2])
w.record("line1")
w.close()
Then I read the shapefile:
sf = shapefile.Reader(shapname)
datas = sf.shapes()
for data in datas:
points = data.points
x, y = zip(*points)
z = data.z
How to get the field name for data(x,y,z)?