Coverage Report

Created: 2026-02-14 06:52

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/gdal/apps/gdalalg_raster_mosaic.h
Line
Count
Source
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
18
//! @cond Doxygen_Suppress
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
0
    {
37
0
        return true;
38
0
    }
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
0
        : GDALRasterMosaicAlgorithm(/* standaloneStep = */ true)
58
0
    {
59
0
    }
60
61
    ~GDALRasterMosaicAlgorithmStandalone() override;
62
};
63
64
//! @endcond
65
66
#endif