Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.prepareFastSubset error in skeletonize_pc #15

Open
spono opened this issue Jun 11, 2024 · 0 comments
Open

.prepareFastSubset error in skeletonize_pc #15

spono opened this issue Jun 11, 2024 · 0 comments

Comments

@spono
Copy link

spono commented Jun 11, 2024

Hi,
using skeletonize_pc with default parameters I'm getting the following error:

 (1/4) Computing layers    [==========================] 100%
 (2/4) Clustering layers   [==========================] 100%
 (3/4) Building skeleton   [==========================] 100%
 (4/4) Computing topology  [============>-------------]  50%Error in .prepareFastSubset(isub = isub, x = x, enclos = parent.frame(),  : 
  RHS of == is length 0 which is not 1 or nrow (28349). For robustness, no recycling is allowed (other than of length 1 RHS). Consider %in% instead.

it seems to be related to the data.table package (see here) but I didn't get where this might be located in your process. I stick it here and I'll check if I'm able to dig a bit more in your code in the next days.

In the meantime, here the code used:

library(aRchi)
library(TreeLS) # my own fork, updated version

file = system.file("extdata", "pine.laz", package="TreeLS")
tls = readTLS(file)

# normalize the point cloud
tls = tlsNormalize(tls, keep_ground = F)

# build an empty aRchi file and add the point cloud
aTree = aRchi::build_aRchi()
aTree = aRchi::add_pointcloud( aTree, point_cloud = tls)

# build a skeleton from the point cloud
skeTree = skeletonize_pc(
  aTree,
  D = 0.03,
  progressive = TRUE,
  cl_dist = 0.02,
  max_d = 0.05
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant