Closed spono closed 1 month ago
All these rlas
functions are not meant to be used by users. They are used internally by lidR
to handle LAS specification compliance. First the function takes a header (list
) as input and not a point cloud (data.frame
) and certainly no a LAS
from lidR
. rlas
knows nothing about lidR
. Second the goal of rlas::is_empty_point_cloud
is not to know if the point cloud if empty but rather to pass or fail a test of LAS specification compliance. Having 0 point is not a failure so it return TRUE
LASfile <- system.file("extdata", "MixedConifer.laz", package="lidR")
las <- readLAS(LASfile, select = "xyz")
las = filter_poi(las, Z > 50)
rlas::is_empty_point_cloud(as.list(header(las)))
#> TRUE
rlas::is_empty_point_cloud(as.list(header(las)), "warning")
#> Warning : Invalid header: the header state there are 0 point in the file
rlas::is_empty_point_cloud(as.list(header(las)), "stop")
#> Error : Invalid header: the header state there are 0 point in the file
ok, I imagined there was something "bigger" behind, but checkin the documentation I didn't get what you explained. thanks!
Ciao JR, just a quick question: I stepped for the first time into
rlas::is_empty_point_cloud()
noticing that it behaves in the opposite way tolidR::is.empty()
. All data processing seems to go properly but, in any case, I prefer to ask: is that meant to be like that?