Replies: 2 comments
-
In tri = triangulate(filter = keep_first())
ras = rasterize(x, tri)
tri + rast You can verify it easily: lasR::chm(tin = TRUE)
#> -----------
#> triangulate (uid:21db)
#> max_edge : 0
#> filter : -keep_first
#> output :
#> use_attribute : Z
#> -----------
#> rasterize (uid:561b)
#> res : 1
#> connect : uid:21db04e6
#> filter :
#> output : /tmp/RtmpuKEeO0/file1a999922b41173.tif
#> ----------- A triangulation-based CHM is not necessarily better than a simple point-to-raster CHM, especially in high-density point clouds. The goal of a TIN-based CHM is to interpolate and fill missing pixels for fine-grained CHMs when dealing with not very dense point clouds. With 50 points/m² and a resolution of 0.5 m, you have on average 12 points per pixel, which is enough to build a point-to-raster CHM. A strict TIN-based CHM will have more noise because, for a given pixel, it will query the corresponding Z value in the triangulation without integrating the surrounding environment. If you are unlucky, the pixels fall in a low triangle, and you get a pit. Statistically, you will have a lot of pits. lasR performs a strict triangulation of the first returns. lidR does a bit more by also pre-filtering the highest points, thus returning a slightly better CHM. Without Long story short, TIN-based CHMs are more suitable for low-density point clouds when you need to interpolate. Use a point-to-raster approach; it is much faster and more accurate in high-density point clouds. For your information, my software lidR and lasR are no longer supported by my university. While the software will remain free and open source, I am now self-employed to sustain its development. I am offering my services independently for training courses, consulting, and development. For more information, please visit my website: https://www.r-lidar.com/. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much for the detailed explanation. It's now clear to me. |
Beta Was this translation helpful? Give feedback.
-
I have a dense point cloud (about 50 p/m²), normalized it, applied some filtering and wanted to compute a triangulation-based CHM. To show my problem, I also included computation of a point-to-raster-based CHM.
The p2r-based CHM looks quite well, but the tin-based CHM shows some unexpected values, e.g. pixels with higher values directly next to pixels with lower values, like noise.
I then tried to do the tin-based CHM computation with
lidR
using the already normalized and filtered point cloud written to disk before. I used thedsmtin()
algorithm one time keeping only the highest point per pixel before triangulation (highest = T
) and one time using all first returns (highest = F
).The resulting CHM with
highest = T
looks good, but the other one withhighest = F
looks similar to the one computed withlasR
(even if it's not quite as bad).It is possible to compute a tin-based CHM with
highest = F
inlidR
without having such noise by thinning the point cloud.To cut a long story short: I only want to understand if the triangulation implemented in
lasR
uses all first returns (as withhighest = F
in lidR`)? Maybe my problem is somehow related to this issue? If you want to reproduce it with my laz file I provided it here.Beta Was this translation helpful? Give feedback.
All reactions