Python中的Las/Laz读写
项目描述
pylas
另一种在Python中读取LAS/LAZ的方法。
示例
import pylas
# Directly read and write las
las = pylas.read('filename.las')
las = pylas.convert(las, point_format_id=2)
las.write('converted.las')
# Open data to inspect header and then read
with pylas.open('filename.las') as f:
if f.header.point_count < 10 ** 8:
las = f.read()
print(las.vlrs)
一些粗略的文档可以在ReadTheDocs上找到。
依赖项和需求
仅Python 3。
lazperf是一个可选但推荐的依赖项,允许pylas读取和写入压缩的LAZ文件。
安装
pip install pylas