# NOT RUN {
LASfile <- system.file("extdata", "Topography.laz", package="lidR")
las = readLAS(LASfile)
plot(las)
# --- First option: compute a raster DTM with grid_terrain ---
# (or read it from a file)
dtm = grid_terrain(las, method = "kriging", k = 10L)
lasnormalize(las, dtm)
plot(dtm)
plot(las)
# --- Second option: interpolate each point (no discretization) ---
las = readLAS(LASfile)
lasnormalize(las, method = "kriging", k = 10L, model = gstat::vgm(0.59, "Sph", 874))
plot(las)
# }
Run the code above in your browser using DataLab