Molina-Valero / FORTLS

Automatic Processing of Terrestrial-Based Technologies Point Cloud Data for Forestry Purposes
https://CRAN.R-project.org/package=FORTLS
21 stars 7 forks source link

LAS won't normalize due to Z value restrictions #18

Open ashlynolah opened 6 months ago

ashlynolah commented 6 months ago

Every time I try to run my code for the normalize() function, I get errors when I add constraints for the min.height and max.height values.

I keep getting this error: Error in $<-.data.frame(x, name, value): replacement has 2 rows, data has 0

It runs when I have the NULL function in, but when I try to define my own constraints, it doesn't seem to run, and I'm not sure why. It stops at 83%.

My scans are single tree scans of the base of giant sequoia adapted from iPad Pro LiDAR. Each scan only has one tree stump in it.

las_317 <- readLAS("utm_zone_11_point_cloud.las")

pcd.single1 <- normalize(las = las_317, x.center = 328275.5, y.center = 4063829, max.dist = 15, min.height = min(las_317), \ max.height = max(las_317), algorithm.dtm = "knnidw", res.dtm = 0.2, csf = list(cloth_resolution = 0.5), RGB = TRUE, scan.approach = "single", file = NULL, id = "utm_zone_11_point_cloud.las", dir.data = dir.data, dir.result = dir.result)

Any assistance with this would be helpful. I've tried all different kinds of numbers for the min and max height, not sure how to troubleshoot this further. The file is too big to paste here but I can email it to you if you provide your email.

ashlynolah commented 6 months ago

I've zipped up the LAS file and added it here: LAS File

ashlynolah commented 6 months ago

Sent you an email!

Molina-Valero commented 6 months ago

Ok. So, we are in contact by email! Juan