Closed flottsam closed 1 year ago
I don't know what is the error. You must provide a reproductible exemple. When failing the LAScatalog processing engine save the chunk that failed in a temp file. You can read it and run the function on this particular chunk to reproduce the exact condition that lead to a crash.
chunk <- readRDS(...)
las <- readLAS(chunk)
silva <- silva2016(chm=chm, treetops = trees)
segment_trees(las, algorithm = silva, attribute = "treeID", uniqueness = "bitmerge")
If the error is reproductible, you must send me some data so I can reproduce.
Thanks
.
.
.
.
Sorry to bombard you with so many replies, but the problem appears to be related to the tiles that do not spatially intersect w/ the CHM. Below better visualizes the problem.
I first use trees <- locate_trees(chm, lmf(f))
. Then, I subset the CTG with ctg_subset <- catalog_select(ctg, chm)
, and then ctg_trees <- segment_trees(ctg_subset, silva2016(chm, trees))
, and get the results below (_Warning: _1: No tree can be used as seed__ ). Orange tiles do not have trees because the CHM does not exist there
The problem is when I try to delineate crowns from the newly segmented CTG. crowns <- crown_metrics(ctg_trees, func = .stdtreemetrics, geom = "concave")
, because there are no trees in those tiles that do intersect spatially with the CHM.
I appreciate that you are trying to provide many details. However as you said, you bombarded me we data. At this stage I'm no longer able to sort out all the data you gave me.
Can you produce a clean and tidy minimal reproducible example using a small data file ? If the problem comes from seeds, chm and tiles that do not match I guess it should be easy to reproduce with the data shipped with the package.
I subset the ctg using a shapefile rather than the chm and was able to process w/o error.
I'm trying to segment a las catalog and not sure how to interpret the error message:
This particular tile has powerlines in it, which I suspect may be the issue.
To find the trees, I used:
(trees <- locate_trees(ctg, algorithm = lmfauto(), uniqueness = "bitmerge"))
And to segment:
Sometimes the error message is returned on a different tile. They are always (so far) tiles on the edge of the catalog.