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

Method inspect

io/EptReader.cpp:460–508  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

458
459
460QuickInfo EptReader::inspect()
461{
462 QuickInfo qi;
463
464 initialize();
465
466 qi.m_bounds = m_p->info->boundsConforming();
467 qi.m_srs = m_p->info->srs();
468 qi.m_pointCount = m_p->info->points();
469
470 for (auto& el : m_p->info->dims())
471 qi.m_dimNames.push_back(el.first);
472
473 // If there is a spatial filter from an explicit --bounds, an origin query,
474 // or polygons, then we'll limit our number of points to be an upper bound,
475 // and clip our bounds to the selected region.
476 if (m_p->hasSpatialFilter())
477 {
478 log()->get(LogLevel::Debug) <<
479 "Determining overlapping point count" << std::endl;
480
481 m_p->hierarchy.reset(new ept::Hierarchy);
482 overlaps();
483
484 // If we've passed a spatial filter, determine an upper bound on the
485 // point count based on the hierarchy.
486 qi.m_pointCount = 0;
487 for (const ept::Overlap& overlap : *m_p->hierarchy)
488 qi.m_pointCount += overlap.m_count;
489
490 //ABELL - This is wrong since we're not transforming the tile bounds to the
491 // SRS of each clip region, but that seems like a lot of mess for
492 // little value. Wait until someone complains. (Note that's it's a bit
493 // different from queryOverlaps or we'd just call that.)
494 // Clip the resulting bounds to the intersection of:
495 // - the query bounds (from an explicit bounds or an origin query)
496 // - the extents of the polygon selection
497 BOX3D b;
498 b.grow(m_p->bounds.box);
499 for (const auto& poly : m_args->m_polys)
500 b.grow(poly.bounds());
501
502 if (b.valid())
503 qi.m_bounds.clip(b);
504 }
505 qi.m_valid = true;
506
507 return qi;
508}
509
510
511void EptReader::addDimensions(PointLayoutPtr layout)

Callers

nothing calls this directly

Calls 11

initializeFunction · 0.85
overlapsFunction · 0.85
logFunction · 0.50
srsMethod · 0.45
pointsMethod · 0.45
hasSpatialFilterMethod · 0.45
getMethod · 0.45
resetMethod · 0.45
growMethod · 0.45
boundsMethod · 0.45
validMethod · 0.45

Tested by

no test coverage detected