lidr LAScatalog 手动分类

问题描述 投票:0回答:1

我有一些不寻常的 LAS 瓷砖。我知道我所有的点都代表“地面”。 LAS 文件已经过预处理和分类。但所有积分都是Class = 8L。我需要将它们全部重新分类为 2L 才能将它们用作地形。

我发现它对于分类槽所在的 LAS 类效果很好。

las$Classification <- 2L
但是如何为 LAScatalog 做到这一点呢?我尝试了多种方法但没有成功。也许可以定义一个自定义分类器?

编辑: @JRR 提出的 spolution 非常适合我,但仅适用于单个 las 瓷砖,不适用于 LAScatalog。

l<-list.files(mylasfiles)
cg<-readLAScatalog(l[1:10], filter = "-change_classification_from_to 8 2") # does not work
cg<-readLAScatalog(l[1], filter = "-change_classification_from_to 8 2") # works fine
classification point-clouds lidr
1个回答
1
投票

您不需要重写您的文件,您可以在读取时进行转换

readLAS(file, filter = "-change_classification_from_to 8 2")

您可以使用

LAScatalog

执行相同操作
readLAScatalog(file, filter = "-change_classification_from_to 8 2")
© www.soinside.com 2019 - 2024. All rights reserved.