Replies: 1 comment 1 reply
-
zeros are definitively a bug. Everything is zero. It is now fixed. It was because the file already contains 1 extrabytes attribute (
Yes and no. They are closely related. The same code is driving
library(lasR)
f <- system.file("extdata", "Megaplot.las", package="lasR")
pipeline <- geometry_features(k = 10 , features = "E") + write_las()
ans <- exec(pipeline, on = f)
library(lidR)
las <- readLAS(ans)
planar = las$lambda2 > th1*las$lambda1 & th2*las$lambda2 > las$lambda3
library(lasR)
f <- system.file("extdata", "Megaplot.las", package="lasR")
pipeline <- geometry_features(k = 4 , features = "Elcpsa") + write_las()
ans <- exec(pipeline, on = f)
library(lidR)
las = readLAS(ans)
head(las@data[,-(1:16)])
#> lambda1 lambda2 lambda3 anisotropy planarity sphericity linearity curvature
#> <num> <num> <num> <num> <num> <num> <num> <num>
#> 1: 1.2794592 0.2380226 0.005268082 0.9958826 0.18191633 0.004117429 0.8139662 0.003459584
#> 2: 0.8219272 0.6144714 0.016984632 0.9793356 0.72693396 0.020664399 0.2524016 0.011686272
#> 3: 0.8219272 0.6144714 0.016984632 0.9793356 0.72693396 0.020664399 0.2524016 0.011686272
#> 4: 6.1178975 1.2201468 0.986347556 0.8387767 0.03821562 0.161223292 0.8005611 0.118488848
#> 5: 1.7888292 1.0966250 0.063370854 0.9645741 0.57761472 0.035425883 0.3869594 0.021490205
#> 6: 1.9836067 0.3613420 0.012276238 0.9938111 0.17597531 0.006188847 0.8178359 0.005207920
las = readLAS(f)
M <- point_eigenvalues(las, k = 4, metrics = TRUE)[,-1]
head(M)
#> eigen_largest eigen_medium eigen_smallest curvature linearity planarity sphericity anisotropy
#> <num> <num> <num> <num> <num> <num> <num> <num>
#> 1: 1.2794593 0.2380226 0.005268082 0.003459585 0.8139662 0.18191633 0.004117429 0.9958826
#> 2: 0.8219272 0.6144715 0.016984633 0.011686272 0.2524016 0.72693396 0.020664400 0.9793356
#> 3: 0.8219272 0.6144715 0.016984633 0.011686272 0.2524016 0.72693396 0.020664400 0.9793356
#> 4: 6.1178973 1.2201468 0.986347568 0.118488847 0.8005611 0.03821562 0.161223296 0.8387767
#> 5: 1.7888292 1.0966249 0.063370857 0.021490206 0.3869594 0.57761470 0.035425884 0.9645741
#> 6: 1.9836067 0.3613420 0.012276238 0.005207919 0.8178358 0.17597531 0.006188847 0.9938112 |
Beta Was this translation helpful? Give feedback.
-
Just for my understanding, the pointwise geometry features implemented in lasR are a different thing than metrics via
segment_shapes
in lidR, correct? While we get a value between 0 and 1 for the likeliyhood of being e.g. part of a linear feature here (lasR), the method in lidR uses thesholds to output if a point is e.g. part of a linear feature yes or no.I am curious, can it be that all points for the MixedConifer testdata are 0 for linearity, planarity and sphericity? I tested with different number of neighbours and they are always 0. While e.g. Megaplot gives some plausible results.
Beta Was this translation helpful? Give feedback.
All reactions