-
Notifications
You must be signed in to change notification settings - Fork 16
Description
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."