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

Method createObjMask

filters/SMRFilter.cpp:457–474  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

455}
456
457std::vector<int> SMRFilter::createObjMask(std::vector<double> const& ZImin)
458{
459 // "The second stage of the ground identification algorithm involves the
460 // application of a progressive morphological filter to the minimum surface
461 // grid (ZImin)."
462 std::vector<int> ObjV =
463 progressiveFilter(ZImin, m_args->m_slope, m_args->m_window);
464
465 if (!m_args->m_dir.empty())
466 {
467 std::string fname =
468 FileUtils::toAbsolutePath("ziobj.tif", m_args->m_dir);
469 MatrixXi Obj = Map<MatrixXi>(ObjV.data(), m_rows, m_cols);
470 math::writeMatrix(Obj.cast<double>(), fname, "GTiff", m_args->m_cell, m_bounds, m_srs);
471 }
472
473 return ObjV;
474}
475
476std::vector<double> SMRFilter::createZImin(PointViewPtr view)
477{

Callers

nothing calls this directly

Calls 4

toAbsolutePathFunction · 0.85
writeMatrixFunction · 0.85
emptyMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected