Replies: 3 comments 2 replies
-
I think it is important to have no data. It shows users what they are currently doing such as requesting a too fine grain output with a too low density point cloud. Also Anyway I planned to add a focal function for raster to smooth the canopy and improve tree detection and segmentation. I could add a function to fill NAs. |
Beta Was this translation helpful? Give feedback.
-
v0.10.0library(lasR)
f <- system.file("extdata", "Topography.las", package = "lasR")
chm = rasterize(2, "zmax")
chm2 = lasR:::focal(chm, 8, fun = "mean")
chm3 = lasR:::focal(chm, 8, fun = "max")
pipeline <- reader_las() + chm + chm2 + chm3
u = exec(pipeline, on = f)
terra::plot(u[[1]]) terra::plot(u[[2]]) terra::plot(u[[3]]) Created on 2024-08-01 with reprex v2.1.0 |
Beta Was this translation helpful? Give feedback.
-
For my future self: library(lasR)
#> Warning: package 'lasR' was built under R version 4.4.2
f <- system.file("extdata", "Topography.las", package = "lasR")
chm = rasterize(2, "zmax")
pipeline <- reader_las() + chm
ans = exec(pipeline, on = f)
terra::plot(ans) gdalraster::fillNodata(terra::sources(ans), max_dist = 3, band=1)
#> 0...10...20...30...40...50...60...70...80...90...100 - done.
terra::plot(ans) Created on 2024-12-07 with reprex v2.1.0 |
Beta Was this translation helpful? Give feedback.
-
When processing e.g. CHMs /DTMs we might face areas/ pixels with nodata.
I am wondering if it would make sense to add a focal filtering stage which would allow e.g. to apply a median focal filter just on nodata areas.
There is
pit_fill
which does something similar, however there is no option run it only on nodata and hence it smoothes the entire raster.We could also use a TIN but this also kind of smoothes the ratser and is probably not wanted.
Beta Was this translation helpful? Give feedback.
All reactions