| 83 | |
| 84 | |
| 85 | QuickInfo RdbReader::inspect() |
| 86 | { |
| 87 | using namespace riegl::rdb::pointcloud; |
| 88 | |
| 89 | if (pdal::Utils::isRemote(m_filename)) |
| 90 | m_filename = pdal::Utils::fetchRemote(m_filename); |
| 91 | |
| 92 | RdbPointcloud reader(m_filename, m_filter, m_extras); |
| 93 | riegl::rdb::Pointcloud& rdb = reader.pointcloud(); |
| 94 | { |
| 95 | // query index |
| 96 | QuickInfo result; |
| 97 | QueryStat stat = rdb.stat(); |
| 98 | GraphNode root = stat.index(); |
| 99 | result.m_pointCount = root.pointCountTotal; |
| 100 | |
| 101 | // query spatial reference system |
| 102 | result.m_srs.set(getSpatialReferenceSystem(reader)); |
| 103 | |
| 104 | // query dimensions |
| 105 | PointLayout layout; |
| 106 | reader.addDimensions(&layout); |
| 107 | const auto dimensions = layout.dims(); |
| 108 | for (const auto& dimension: dimensions) |
| 109 | { |
| 110 | result.m_dimNames.push_back(layout.dimName(dimension)); |
| 111 | } |
| 112 | |
| 113 | // query XYZ bounds (if available) |
| 114 | Eigen::Vector4d minimum, maximum; |
| 115 | if (reader.getBoundingBox(minimum, maximum)) |
| 116 | { |
| 117 | result.m_bounds = BOX3D( |
| 118 | minimum[0], minimum[1], minimum[2], |
| 119 | maximum[0], maximum[1], maximum[2] |
| 120 | ); |
| 121 | } |
| 122 | |
| 123 | // finalize result |
| 124 | result.m_valid = true; |
| 125 | return result; |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | |
| 130 | void RdbReader::addArgs(ProgramArgs& args) |
nothing calls this directly
no test coverage detected