Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raster shift in LidarPointStats? #273

Open
yurithefury opened this issue Sep 6, 2022 · 3 comments · May be fixed by #275
Open

Raster shift in LidarPointStats? #273

yurithefury opened this issue Sep 6, 2022 · 3 comments · May be fixed by #275

Comments

@yurithefury
Copy link

  • 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
)

Layout 1

@jfbourdon
Copy link
Contributor

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).

@yurithefury
Copy link
Author

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.

@jfbourdon
Copy link
Contributor

There was an issue in the way the position of each point in the raster was determined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants