Python 创建liblas.point.point类型,以便使用liblas模块保存*.las文件
我的数据集为:Python 创建liblas.point.point类型,以便使用liblas模块保存*.las文件,python,formatting,type-conversion,lidar,Python,Formatting,Type Conversion,Lidar,我的数据集为: s '308342.38 6964462.78 122.15 16 1 1 0 0 1 0 114.985 7.1653 ' type (s) <type 'str'> 这是错误消息: file_out.write(s) Traceback (most recent call last): File "<interactive input>", line 1, in <module> File "C:\Python27\lib\site-
s
'308342.38 6964462.78 122.15 16 1 1 0 0 1 0 114.985 7.1653 '
type (s)
<type 'str'>
这是错误消息:
file_out.write(s)
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
File "C:\Python27\lib\site-packages\liblas\file.py", line 382, in write
'be of type liblas.point.Point' % pt)
文件输出。写入
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
写入文件“C:\Python27\lib\site packages\liblas\File.py”,第382行
“”的类型应为liblas.point.point“%pt”
您可以通过实例化点来创建点实例:
pt = liblas.point.Point()
然后,您只需填写它的字段(
x
,y
,z
,等等)并编写它。是的,非常感谢!!!!。您认为在新文件中创建一个要关联的“头”方便吗?如何填写其字段以及如何编写?
pt = liblas.point.Point()