View source: R/preprocessing.R
| recenter_las | R Documentation |
Function calculates the tree location using points below specified 'height' and recenters on 'X=0 Y=0'
recenter_las(las, height = 1)
las |
'LAS' object from 'lidR' package representing |
height |
consider only points where Z < height, if specified. Useful for considering only the tree bole, for centering. individually segmented tree. Set 'height = NULL' to recenter using all points. |
A 'LAS' object with X and Y coordinates recentered to (0, 0).
library(lidR)
las = readLAS(system.file("extdata", "tree_0744.laz", package="tReeTraits"))
# view histogram of original X/Y values
par(mfrow=c(1,2))
hist(las$X)
hist(las$Y)
las = recenter_las(las)
# view histogram of X/Y values centered on 0,0
hist(las$X)
hist(las$Y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.