r-lidar / lidR

Airborne LiDAR data manipulation and visualisation for forestry application
https://CRAN.R-project.org/package=lidR
GNU General Public License v3.0
601 stars 131 forks source link

pixel_metrics-zmean is inconsistent between adjacent processed areas #582

Closed mkieser closed 2 years ago

mkieser commented 2 years ago

I am running the pixel_metrics (.stdmetrics_z, resolution = 5) on first returns of two adjacent normalized lidar datasets and the results for zmean on the two datasets are quite different, and drastically noticeable where the two datasets are adjacent. adjacent_pixel_metrics_zmean

bi0m3trics commented 2 years ago

First thought - are the first return point densities the same between the two datasets? zmean would be highly sensitive to differences in density (as opposed to say, something like zmax).

Jean-Romain commented 2 years ago

Or simply you loaded the two rasters one after the other independently in QGIS and the color scheme are different because colors are attributed independently to each raster. If loaded as one raster it will look good. I'm highly confident that pixel_metrics() is not involved here.

mkieser commented 2 years ago

When I join the two LiDAR datasets, run the same algorithm and style the same, the distinction disappears. The values in the derived product from the left dataset are exactly the same as the combined, the right are are different. merged_pixel_metrics_zmean