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

Method inspect

plugins/rdb/io/RdbReader.cpp:85–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83
84
85QuickInfo 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
130void RdbReader::addArgs(ProgramArgs& args)

Callers

nothing calls this directly

Calls 8

isRemoteFunction · 0.85
fetchRemoteFunction · 0.85
dimNameMethod · 0.80
BOX3DClass · 0.50
indexMethod · 0.45
setMethod · 0.45
addDimensionsMethod · 0.45
getBoundingBoxMethod · 0.45

Tested by

no test coverage detected