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

Method createLowMask

filters/SMRFilter.cpp:400–422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

398}
399
400std::vector<int> SMRFilter::createLowMask(std::vector<double> const& ZImin)
401{
402 // "[The] minimum surface is checked for low outliers by inverting the point
403 // cloud in the z-axis and applying the filter with parameters (slope =
404 // 500%, maxWindowSize = 1). The resulting mask is used to flag low outlier
405 // cells as OBJ before the inpainting of the provisional DEM."
406
407 // Need to add a step to negate ZImin
408 std::vector<double> negZImin;
409 std::transform(ZImin.begin(), ZImin.end(), std::back_inserter(negZImin),
410 [](double v) { return -v; });
411 std::vector<int> LowV = progressiveFilter(negZImin, 5.0, m_args->m_cell);
412
413 if (!m_args->m_dir.empty())
414 {
415 std::string fname =
416 FileUtils::toAbsolutePath("zilow.tif", m_args->m_dir);
417 MatrixXi Low = Map<MatrixXi>(LowV.data(), m_rows, m_cols);
418 math::writeMatrix(Low.cast<double>(), fname, "GTiff", m_args->m_cell, m_bounds, m_srs);
419 }
420
421 return LowV;
422}
423
424std::vector<int> SMRFilter::createNetMask()
425{

Callers

nothing calls this directly

Calls 7

transformFunction · 0.85
toAbsolutePathFunction · 0.85
writeMatrixFunction · 0.85
beginMethod · 0.45
endMethod · 0.45
emptyMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected