一个简单的Python包来读取LAZ文件(LAS too)。

simplaz的Python项目详细描述


GitHub licensePyPI version

辛普拉兹

一个Python包来读取LAZ文件(lastoo)。 基本上它是Rust las的包装器,它公开了最有用的方法。在

如果没有内存,你就不能按顺序读取整个内存。在

现在只看书,以后再写。在

安装

皮普

要安装最新版本:pip install simplaz

发展

  1. 安装Rust(v1.39+)
  2. 安装maturin
  3. maturin develop
  4. 移动到另一个文件夹,import simplaz不应返回任何错误

文件

pydoc可以找到here。在

示例

importsimplazimportnumpyasnpds=simplaz.read_file("/Users/hugo/data/ahn3/crop.laz")header=ds.headerprint("LAS v{}".format(header.version))print("Point count: {}".format(header.number_of_points))#-- using numpy functions#-- define a specific numpy typemypoint=np.dtype([('x','float64'),('y','float64'),('z','float64'),('intensity','int16')])pts=np.zeros((ds.header.number_of_points,),dtype=mypoint)#-- iterate over all the points and store in numpy array only #-- the ground point (classification=2)for(i,p)inenumerate(ds):ifp.classification==2:pts[i][0]=p.xpts[i][1]=p.ypts[i][2]=p.zpts[i][3]=p.classificationprint(len(pts))

支持什么,不支持什么?在

支持大多数LAS v1.4,除了:

  • v1.4支持每个点后的额外位

LAS类

Classificationdescription
0Created, never classified
1Unclassfied
2Ground
3Low Vegetation
4Medium Vegetation
5High Vegetation
6Building
7Low Point (noise)
8Model Key-point (mass point)
9Water
10Reserved for ASPRS definition
11Reserved for ASPRS definition
12Overlap Points
13-31Reserved for ASPRS definition

LAS点格式

这是很好的解释on this page。在

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java书签JSF2应用程序中的页面   在hibernate标准中编写不同的java   Java正则表达式,删除每行的前导空格   shell如何在Java中从字符串编程相对路径   java在没有存储库的旧项目上返回   java无法写入。在检查我是否有相同的号码后,使用ApachePOI进行xls   java在Android工具栏中显示图标   java如何在QuerydslPredicateExecutor中的包含忽略大小写中使用?   javaspringboot应用程序javax到jakarta迁移问题   java Apache Beam从2个输入源读取数据,在某些情况下无法正确连接数据   带Android的base64 Apache Commons编解码器:找不到方法   HTTP头中CRLF序列的java不正确中和   通用域名格式。太阳在Java 7 update 67中找不到corba类   java使用jUnit测试尚未创建的类/对象