Closed karnayogendra closed 7 years ago
Hi, lastrees
returns NULL
because the original point cloud is updated by reference. The non NULL
outputs are only extra output.
Value
Nothing, the point cloud is updated by reference. If extra = TRUE, "dalponte2012" returns two RasterLayers, "watershed" returns one RasterLayer and "li2012" does not support the extra parameter.
extra logical. By default the function works at the point cloud level and returns nothing. If extra = TRUE the function can return a RasterLayer or a list of 2 RasterLayers with the positions of the local maxima and a map of the crowns, depending on the algorithm used.
I will change the example in the doc and in the wiki. You're not the first one to ask this question (#55). I will remove the 'extra' data from all the examples.
Nevertheless the example in the doc sounds clear to me. The function lastrees
is explicitly used without using a new variable. Could you tell me what you misunderstood in the doc? It might help me to improve the document for the next release.
Regards
Hi Jean, I am trying to segment the individual tree crown using "li2012" algorithm of lastrees function but the results returned into the NULL, however, I am able to do the segmentation using "dalponte2016" and "watershed" algorithm. Here is the details code that I used.
RLas <- readLAS("F:/RQ1_RQ2/processing/2007norm/07_ROI10_norm.las")
lidarfilter <- lasfilter(RLas, Z>=0 & Z <=50)
t2 <- lastrees(lidarfilter, "li2012")
t2 returned into NULL.Your help will be much appreciated. Many thanks. Regards, Yogendra