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

Method inspect

io/TextReader.cpp:57–88  ·  view source on GitHub ↗

NOTE: - Forces reading of the entire file.

Source from the content-addressed store, hash-verified

55
56// NOTE: - Forces reading of the entire file.
57QuickInfo TextReader::inspect()
58{
59 QuickInfo qi;
60 FixedPointTable t(100);
61
62 StatsFilter f;
63 f.setInput(*this);
64
65 f.prepare(t);
66 PointLayoutPtr layout = t.layout();
67 for (Dimension::Id id : layout->dims())
68 qi.m_dimNames.push_back(layout->dimName(id));
69 f.execute(t);
70
71 try
72 {
73 stats::Summary xSummary = f.getStats(Dimension::Id::X);
74 qi.m_pointCount = xSummary.count();
75 qi.m_bounds.minx = xSummary.minimum();
76 qi.m_bounds.maxx = xSummary.maximum();
77 stats::Summary ySummary = f.getStats(Dimension::Id::Y);
78 qi.m_bounds.miny = ySummary.minimum();
79 qi.m_bounds.maxy = ySummary.maximum();
80 stats::Summary zSummary = f.getStats(Dimension::Id::Z);
81 qi.m_bounds.minz = zSummary.minimum();
82 qi.m_bounds.maxz = zSummary.maximum();
83 qi.m_valid = true;
84 }
85 catch (pdal_error&)
86 {}
87 return qi;
88}
89
90
91// Make sure we have a header line.

Callers

nothing calls this directly

Calls 5

dimNameMethod · 0.80
prepareMethod · 0.45
executeMethod · 0.45
minimumMethod · 0.45
maximumMethod · 0.45

Tested by

no test coverage detected