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

Use int32 to store density counts #40

Open
danielrode opened this issue Sep 30, 2024 · 0 comments
Open

Use int32 to store density counts #40

danielrode opened this issue Sep 30, 2024 · 0 comments

Comments

@danielrode
Copy link

This would allow pdal_wrench density to better handle high-density LiDAR collections.

As noted in #39, if a collection has densities that are too high, it can result in PDAL crashing, such as in this case where the count reached 35,017 (a few thousand more than 32,767, which is the maximum value of a short integer):

0terminate called after throwing an instance of 'pdal::pdal_error'
what(): writers.gdal: Unable to write block for for raster './export/tiles/994_43.tif'.
Unable to convert data for raster type as requested: -> short
./gen-density-raster.sh: line 24: 43971 Aborted (core dumped) /usr/lib64/qgis/pdal_wrench density "${args[@]}"

This particular error resulted from trying to make a 20-meter density raster using the GDAL writer on a high-density LiDAR collection.

As @hobu noted in #39, "Wrench is using an int16_t to store the counts. This could probably be bumped to an int32_t without impact, especially if the output TIFF is being compressed with a common compression encoding."

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

No branches or pull requests

1 participant