Skip to content

Use int32 to store density counts #40

@danielrode

Description

@danielrode

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions