GDAL

gdalalg_raster_mosaic.h
1/******************************************************************************
2 *
3 * Project: GDAL
4 * Purpose: gdal "raster mosaic" subcommand
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#ifndef GDALALG_RASTER_MOSAIC_INCLUDED
14#define GDALALG_RASTER_MOSAIC_INCLUDED
15
16#include "gdalalg_raster_mosaic_stack_common.h"
17
19
20/************************************************************************/
21/* GDALRasterMosaicAlgorithm */
22/************************************************************************/
23
24 class GDALRasterMosaicAlgorithm /* non final */
25 : public GDALRasterMosaicStackCommonAlgorithm
26{
27 public:
28 static constexpr const char *NAME = "mosaic";
29 static constexpr const char *DESCRIPTION =
30 "Build a mosaic, either virtual (VRT) or materialized.";
31 static constexpr const char *HELP_URL = "/programs/gdal_raster_mosaic.html";
32
33 explicit GDALRasterMosaicAlgorithm(bool bStandalone = false);
34
35 bool CanBeFirstStep() const override
36 {
37 return true;
38 }
39
40 private:
41 bool RunStep(GDALPipelineStepRunContext &ctxt) override;
42
43 bool m_addAlpha = false;
44 std::string m_pixelFunction{};
45 std::vector<std::string> m_pixelFunctionArgs{};
46};
47
48/************************************************************************/
49/* GDALRasterMosaicAlgorithmStandalone */
50/************************************************************************/
51
52 class GDALRasterMosaicAlgorithmStandalone final
53 : public GDALRasterMosaicAlgorithm
54{
55 public:
56 GDALRasterMosaicAlgorithmStandalone()
57 : GDALRasterMosaicAlgorithm(/* standaloneStep = */ true)
58 {
59 }
60
61 ~GDALRasterMosaicAlgorithmStandalone() override;
62};
63
65
66#endif