MCPcopy Create free account
hub / github.com/PDAL/PDAL / validateHeader

Method validateHeader

io/LasWriter.cpp:735–754  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

733}
734
735void LasWriter::validateHeader()
736{
737 if (m_scaling.m_xXform.m_scale.m_val == 0.0)
738 throwError("X scale of 0.0 is invalid.");
739 if (m_scaling.m_yXform.m_scale.m_val == 0.0)
740 throwError("Y scale of 0.0 is invalid.");
741 if (m_scaling.m_zXform.m_scale.m_val == 0.0)
742 throwError("Z scale of 0.0 is invalid.");
743 if (d->header.hasWave())
744 throwError("PDAL does not support point formats with waveform data (4, 5, 9 and 10)");
745 if (d->header.versionAtLeast(1, 4))
746 {
747 if (d->header.pointFormat() > 10)
748 throwError("LAS version 1." + std::to_string(d->header.versionMinor) +
749 " only supports point formats 0-10.");
750 }
751 else if (d->header.pointFormat() > 5)
752 throwError("LAS version 1." + std::to_string(d->header.versionMinor) +
753 " only supports point formats 0-5.");
754}
755
756void LasWriter::readyCompression()
757{

Callers

nothing calls this directly

Calls 3

hasWaveMethod · 0.45
versionAtLeastMethod · 0.45
pointFormatMethod · 0.45

Tested by

no test coverage detected