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

Method dump

pdal/PointView.cpp:254–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252
253
254void PointView::dump(std::ostream& ostr) const
255{
256 using std::endl;
257 PointLayoutPtr layout = m_pointTable.layout();
258 const Dimension::IdList& dims = layout->dims();
259
260 point_count_t numPoints = size();
261 ostr << "Contains " << numPoints << " points" << endl;
262 for (PointId idx = 0; idx < numPoints; idx++)
263 {
264 ostr << "Point: " << idx << endl;
265
266 for (auto di = dims.begin(); di != dims.end(); ++di)
267 {
268 Dimension::Id d = *di;
269 const Dimension::Detail *dd = layout->dimDetail(d);
270 ostr << layout->dimName(d) << " (" <<
271 Dimension::interpretationName(dd->type()) << ") : ";
272
273 switch (dd->type())
274 {
275 case Dimension::Type::Signed8:
276 {
277 ostr << (int)(getFieldAs<int8_t>(d, idx));
278 break;
279 }
280 case Dimension::Type::Signed16:
281 {
282 ostr << getFieldAs<int16_t>(d, idx);
283 break;
284 }
285 case Dimension::Type::Signed32:
286 {
287 ostr << getFieldAs<int32_t>(d, idx);
288 break;
289 }
290 case Dimension::Type::Signed64:
291 {
292 ostr << getFieldAs<int64_t>(d, idx);
293 break;
294 }
295 case Dimension::Type::Unsigned8:
296 {
297 ostr << (unsigned)(getFieldAs<uint8_t>(d, idx));
298 break;
299 }
300 case Dimension::Type::Unsigned16:
301 {
302 ostr << getFieldAs<uint16_t>(d, idx);
303 break;
304 }
305 case Dimension::Type::Unsigned32:
306 {
307 ostr << getFieldAs<uint32_t>(d, idx);
308 break;
309 }
310 case Dimension::Type::Unsigned64:
311 {

Callers 4

PointView.cppFile · 0.45
outputHelpMethod · 0.45
parseMethod · 0.45
outputHelpMethod · 0.45

Calls 6

interpretationNameFunction · 0.85
dimNameMethod · 0.80
sizeFunction · 0.70
beginMethod · 0.45
endMethod · 0.45
typeMethod · 0.45

Tested by 1

parseMethod · 0.36