whitebox-tools
whitebox-tools copied to clipboard
Raster shift in LidarPointStats?
- whitebox version: 2.1.4
- Python version: 3.8
- Operating System: Win11/WSL2
Description
Hi. I used LidarPointStats
tool through whitebox-python to create a grid with each raster cell representing the number of points. The tool worked fine. However, it looks like the output is either incorrect or shifted (see the screenshot below). Is this the expected behaviour or am I doing something wrong?
What I Did
wbt.lidar_point_stats(
i=lidar.las,
resolution=1.0,
num_points=True,
num_pulses=False,
avg_points_per_pulse=False,
z_range=False,
intensity_range=False,
predom_class=False
)
Could you provide your LAS file? I tried with one of my files and the number points in the raster matches the reality (mostly... I have few cells with a discrepancy nothing like you, only by one unit).
Here's a snippet of the data: CentralAndSouth201306-C2-AHD_481052305_55_1.zip. Use EPSG:28355 to define projection of the output raster, as whitebox's output doesn't preserve this information. Thanks for looking into this.
There was an issue in the way the position of each point in the raster was determined.