LCOV - code coverage report
Current view: top level - apps - gdalalg_mdim_read.cpp (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 11 11 100.0 %
Date: 2026-06-23 16:35:19 Functions: 2 2 100.0 %

          Line data    Source code
       1             : /******************************************************************************
       2             :  *
       3             :  * Project:  GDAL
       4             :  * Purpose:  "read" step of "mdim pipeline"
       5             :  * Author:   Even Rouault <even dot rouault at spatialys.com>
       6             :  *
       7             :  ******************************************************************************
       8             :  * Copyright (c) 2026, Even Rouault <even dot rouault at spatialys.com>
       9             :  *
      10             :  * SPDX-License-Identifier: MIT
      11             :  ****************************************************************************/
      12             : 
      13             : #include "gdalalg_mdim_read.h"
      14             : 
      15             : #include "gdal_priv.h"
      16             : #include "ogrsf_frmts.h"
      17             : 
      18             : //! @cond Doxygen_Suppress
      19             : 
      20             : /************************************************************************/
      21             : /*            GDALMdimReadAlgorithm::GDALMdimReadAlgorithm()            */
      22             : /************************************************************************/
      23             : 
      24           6 : GDALMdimReadAlgorithm::GDALMdimReadAlgorithm(bool openForMixedMdimVector)
      25             :     : GDALMdimPipelineStepAlgorithm(
      26             :           NAME, DESCRIPTION, HELP_URL,
      27           6 :           ConstructorOptions().SetAddDefaultArguments(false))
      28             : {
      29           6 :     AddMdimInputArgs(openForMixedMdimVector,
      30             :                      /* hiddenForCLI = */ false, /* acceptRaster = */ false);
      31           6 : }
      32             : 
      33             : /************************************************************************/
      34             : /*                   GDALMdimReadAlgorithm::RunStep()                   */
      35             : /************************************************************************/
      36             : 
      37           5 : bool GDALMdimReadAlgorithm::RunStep(GDALPipelineStepRunContext &)
      38             : {
      39           5 :     const auto poSrcDS = m_inputDataset[0].GetDatasetRef();
      40           5 :     CPLAssert(poSrcDS);
      41           5 :     CPLAssert(m_outputDataset.GetName().empty());
      42           5 :     CPLAssert(!m_outputDataset.GetDatasetRef());
      43             : 
      44           5 :     m_outputDataset.Set(poSrcDS);
      45             : 
      46           5 :     return true;
      47             : }
      48             : 
      49             : //! @endcond

Generated by: LCOV version 1.14