Coverage Report

Created: 2026-02-14 09:00

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/gdal/apps/gdalalg_raster_stack.h
Line
Count
Source
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
    bool CanBeFirstStep() const override
37
0
    {
38
0
        return true;
39
0
    }
40
41
  private:
42
    bool RunStep(GDALPipelineStepRunContext &ctxt) override;
43
};
44
45
/************************************************************************/
46
/*                  GDALRasterStackAlgorithmStandalone                  */
47
/************************************************************************/
48
49
class GDALRasterStackAlgorithmStandalone final : public GDALRasterStackAlgorithm
50
{
51
  public:
52
    GDALRasterStackAlgorithmStandalone()
53
0
        : GDALRasterStackAlgorithm(/* standaloneStep = */ true)
54
0
    {
55
0
    }
56
57
    ~GDALRasterStackAlgorithmStandalone() override;
58
};
59
60
//! @endcond
61
62
#endif