LCOV - code coverage report
Current view: top level - apps - gdalalg_raster_stack.h (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 6 6 100.0 %
Date: 2025-06-19 12:30:01 Functions: 4 4 100.0 %

          Line data    Source code
       1             : /******************************************************************************
       2             :  *
       3             :  * Project:  GDAL
       4             :  * Purpose:  gdal "raster stack" subcommand
       5             :  * Author:   Even Rouault <even dot rouault at spatialys.com>
       6             :  *
       7             :  ******************************************************************************
       8             :  * Copyright (c) 2025, Even Rouault <even dot rouault at spatialys.com>
       9             :  *
      10             :  * SPDX-License-Identifier: MIT
      11             :  ****************************************************************************/
      12             : 
      13             : #ifndef GDALALG_RASTER_STACK_INCLUDED
      14             : #define GDALALG_RASTER_STACK_INCLUDED
      15             : 
      16             : #include "gdalalg_raster_mosaic_stack_common.h"
      17             : 
      18             : //! @cond Doxygen_Suppress
      19             : 
      20             : /************************************************************************/
      21             : /*                     GDALRasterStackAlgorithm                        */
      22             : /************************************************************************/
      23             : 
      24             : class GDALRasterStackAlgorithm /* non final */
      25             :     : public GDALRasterMosaicStackCommonAlgorithm
      26             : {
      27             :   public:
      28             :     static constexpr const char *NAME = "stack";
      29             :     static constexpr const char *DESCRIPTION =
      30             :         "Combine together input bands into a multi-band output, either virtual "
      31             :         "(VRT) or materialized.";
      32             :     static constexpr const char *HELP_URL = "/programs/gdal_raster_stack.html";
      33             : 
      34             :     explicit GDALRasterStackAlgorithm(bool bStandalone = false);
      35             : 
      36          11 :     bool CanBeFirstStep() const override
      37             :     {
      38          11 :         return true;
      39             :     }
      40             : 
      41             :   private:
      42             :     bool RunStep(GDALPipelineStepRunContext &ctxt) override;
      43             : };
      44             : 
      45             : /************************************************************************/
      46             : /*                   GDALRasterStackAlgorithmStandalone                 */
      47             : /************************************************************************/
      48             : 
      49          16 : class GDALRasterStackAlgorithmStandalone final : public GDALRasterStackAlgorithm
      50             : {
      51             :   public:
      52           8 :     GDALRasterStackAlgorithmStandalone()
      53           8 :         : GDALRasterStackAlgorithm(/* standaloneStep = */ true)
      54             :     {
      55           8 :     }
      56             : 
      57             :     ~GDALRasterStackAlgorithmStandalone() override;
      58             : };
      59             : 
      60             : //! @endcond
      61             : 
      62             : #endif

Generated by: LCOV version 1.14