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

Method addDimensions

io/LasReader.cpp:663–683  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

661
662
663void LasReader::addDimensions(PointLayoutPtr layout)
664{
665 layout->registerDims(las::pdrfDims(d->header.pointFormat()));
666
667 size_t ebLen = d->header.ebCount();
668 for (auto& dim : d->extraDims)
669 {
670 if (dim.m_size > ebLen)
671 throwError("Extra byte specification exceeds point length beyond base format length.");
672 ebLen -= dim.m_size;
673
674 Dimension::Type type = dim.m_dimType.m_type;
675 if (type == Dimension::Type::None)
676 continue;
677 if (dim.m_dimType.m_xform.nonstandard())
678 type = Dimension::Type::Double;
679 if (d->opts.fixNames)
680 dim.m_name = Dimension::fixName(dim.m_name);
681 dim.m_dimType.m_id = layout->registerOrAssignDim(dim.m_name, type);
682 }
683}
684
685
686bool LasReader::processOne(PointRef& point)

Callers

nothing calls this directly

Calls 6

fixNameFunction · 0.85
registerDimsMethod · 0.80
ebCountMethod · 0.80
nonstandardMethod · 0.80
registerOrAssignDimMethod · 0.80
pointFormatMethod · 0.45

Tested by

no test coverage detected