LCOV - code coverage report
Current view: top level - apps - gdalalg_raster_read.cpp (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 10 10 100.0 %
Date: 2025-01-18 12:42:00 Functions: 2 2 100.0 %

          Line data    Source code
       1             : /******************************************************************************
       2             :  *
       3             :  * Project:  GDAL
       4             :  * Purpose:  "read" step of "raster pipeline"
       5             :  * Author:   Even Rouault <even dot rouault at spatialys.com>
       6             :  *
       7             :  ******************************************************************************
       8             :  * Copyright (c) 2024, Even Rouault <even dot rouault at spatialys.com>
       9             :  *
      10             :  * SPDX-License-Identifier: MIT
      11             :  ****************************************************************************/
      12             : 
      13             : #include "gdalalg_raster_read.h"
      14             : 
      15             : #include "gdal_priv.h"
      16             : #include "ogrsf_frmts.h"
      17             : 
      18             : //! @cond Doxygen_Suppress
      19             : 
      20             : /************************************************************************/
      21             : /*          GDALRasterReadAlgorithm::GDALRasterReadAlgorithm()          */
      22             : /************************************************************************/
      23             : 
      24          49 : GDALRasterReadAlgorithm::GDALRasterReadAlgorithm()
      25             :     : GDALRasterPipelineStepAlgorithm(NAME, DESCRIPTION, HELP_URL,
      26          49 :                                       /* standaloneStep =*/false)
      27             : {
      28          49 :     AddInputArgs(/* openForMixedRasterVector = */ false,
      29             :                  /* hiddenForCLI = */ false);
      30          49 : }
      31             : 
      32             : /************************************************************************/
      33             : /*                  GDALRasterReadAlgorithm::RunStep()                  */
      34             : /************************************************************************/
      35             : 
      36          28 : bool GDALRasterReadAlgorithm::RunStep(GDALProgressFunc, void *)
      37             : {
      38          28 :     CPLAssert(m_inputDataset.GetDatasetRef());
      39          28 :     CPLAssert(m_outputDataset.GetName().empty());
      40          28 :     CPLAssert(!m_outputDataset.GetDatasetRef());
      41             : 
      42          28 :     m_outputDataset.Set(m_inputDataset.GetDatasetRef());
      43             : 
      44          28 :     return true;
      45             : }
      46             : 
      47             : //! @endcond

Generated by: LCOV version 1.14