| 618 | |
| 619 | |
| 620 | void 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 |
nothing calls this directly
no test coverage detected