GDAL
gdalalg_raster_stack.h
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
19
20/************************************************************************/
21/* GDALRasterStackAlgorithm */
22/************************************************************************/
23
24class 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 {
38 return true;
39 }
40
41 private:
42 bool RunStep(GDALPipelineStepRunContext &ctxt) override;
43};
44
45/************************************************************************/
46/* GDALRasterStackAlgorithmStandalone */
47/************************************************************************/
48
49class GDALRasterStackAlgorithmStandalone final : public GDALRasterStackAlgorithm
50{
51 public:
52 GDALRasterStackAlgorithmStandalone()
53 : GDALRasterStackAlgorithm(/* standaloneStep = */ true)
54 {
55 }
56
57 ~GDALRasterStackAlgorithmStandalone() override;
58};
59
61
62#endif