Skip to content

Commit

Permalink
Don't add ClassFlags/ScanChannel unless we're processing pointformat …
Browse files Browse the repository at this point in the history
…6-10.
  • Loading branch information
abellgithub committed May 25, 2020
1 parent 1a3215d commit 1728c95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion io/LasReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ void LasReader::addDimensions(PointLayoutPtr layout)
}
if (m_header.hasInfrared())
layout->registerDim(Id::Infrared);
if (m_header.versionAtLeast(1, 4))
if (m_header.has14Format())
{
layout->registerDim(Id::ScanChannel);
layout->registerDim(Id::ClassFlags);
Expand Down
2 changes: 1 addition & 1 deletion test/unit/io/LasReaderTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ TEST(LasReaderTest, extraBytes)
reader.prepare(table);

DimTypeList dimTypes = layout->dimTypes();
EXPECT_EQ(dimTypes.size(), (size_t)24);
EXPECT_EQ(dimTypes.size(), (size_t)22);

Dimension::Id color0 = layout->findProprietaryDim("Colors0");
EXPECT_EQ(layout->dimType(color0), Dimension::Type::Unsigned16);
Expand Down

0 comments on commit 1728c95

Please sign in to comment.