Skip to content

Commit

Permalink
Add more checks about LAS formats with PointAttribute::RGB
Browse files Browse the repository at this point in the history
  • Loading branch information
HeyItsBATMAN authored and Tobias Dorra committed Feb 28, 2025
1 parent b41bbca commit 4721eea
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion schwarzwald/core/io/LASFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,12 @@ las_file_has_attribute(laszip_header const& header, PointAttribute const& attrib
case PointAttribute::Position:
return true; // LAS always has positions
case PointAttribute::RGB:
return header.point_data_format == 2 || header.point_data_format == 3;
return header.point_data_format == 2 || // - Format 2: Core-0 + RGB
header.point_data_format == 3 || // - Format 3: Core-0 + GPS + RGB
header.point_data_format == 5 || // - Format 5: Format 3 + wave packets
header.point_data_format == 7 || // - Format 7: Core-6 + RGB
header.point_data_format == 8 || // - Format 8: Format 7 + NIR
header.point_data_format == 10; // - Format 10: Format 9 + RGB + NIR
case PointAttribute::Intensity:
return true;
case PointAttribute::Normal:
Expand Down

0 comments on commit 4721eea

Please sign in to comment.