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

Method addDimensions

io/CopcReader.cpp:620–642  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

618
619
620void CopcReader::addDimensions(PointLayoutPtr layout)
621{
622 layout->registerDims(las::pdrfDims(m_p->header.pointFormat()));
623
624 size_t ebLen = m_p->header.ebCount();
625 for (auto& dim : m_p->extraDims)
626 {
627 if (dim.m_size > ebLen)
628 throwError("Extra byte specification exceeds point length beyond base format length.");
629 ebLen -= dim.m_size;
630
631 Dimension::Type type = dim.m_dimType.m_type;
632
633 // There is the awful concept of unspecified extra bytes. We don't register them.
634 if (type == Dimension::Type::None)
635 continue;
636 if (dim.m_dimType.m_xform.nonstandard())
637 type = Dimension::Type::Double;
638 if (m_args->fixNames)
639 dim.m_name = Dimension::fixName(dim.m_name);
640 dim.m_dimType.m_id = layout->registerOrAssignDim(dim.m_name, type);
641 }
642}
643
644
645

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