pyshp属性错误:'module'对象没有属性'Writer'

时间:2015-12-07 14:03:03

标签: python attributes shapefile attributeerror

我正在尝试在Windows机器上使用pyshp创建shapefile。我有一长串坐标,我可以使用它,但第一步是让这个小套装起作用。

import shapefile as sf

w=sf.Writer(sf.POINT)
w.point(30.1,30)
w.point(50.1,30)
w.point(70.1,30)
w.point(90,1,30)
w.field('LAT')
w.field('LONG','C','40')
w.record('First','Point')
w.record('Second','Point')
w.record('Third','Point')
w.record('Fourth','Point')
w.save('testpoints')

我一直收到这个错误:

AttributeError:'module'对象没有属性'Writer'

我在输入'sf'后从内置下拉栏中选择了Writer属性。所以我知道shapefile确实有这个属性。它特别是'作家'而不是'作家'。

是否有人熟悉pyshp?

0 个答案:

没有答案
相关问题