Skip to content

Commit

Permalink
provide a better warning for classifications being written into PDRFs…
Browse files Browse the repository at this point in the history
… that are too small PDAL#4358 (PDAL#4360)
  • Loading branch information
hobu authored Mar 15, 2024
1 parent 4ee37c0 commit ecf5a55
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions io/LasWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -993,11 +993,13 @@ bool LasWriter::fillPointBuf(PointRef& point, LeInserter& ostream)
// to 255, but we're writing to PDRF < 6 and can't write values
// over 31.
log()->get(LogLevel::Warning)
<< "Classification " << (int)classification
<< " can't be written to LAS "
<< "The source file Classification " << (int)classification
<< " can't be written to LAS with Point Data Record Format "
<< std::to_string(d->header.pointFormat()) << " and LAS version "
<< std::to_string(d->header.versionMajor) << "."
<< std::to_string(d->header.versionMinor)
<< ". Replaced with value 1." << std::endl;
<< ". It was replaced with value 1. "
"Use a different PDRF if you need to support classifications greater than 31" << std::endl;
classification = ClassLabel::Unclassified;
}

Expand Down

0 comments on commit ecf5a55

Please sign in to comment.