Coverage Report

Created: 2026-07-25 06:50

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/gdal/apps/gdalalg_raster_reclassify.h
Line
Count
Source
1
/******************************************************************************
2
*
3
 * Project:  GDAL
4
 * Purpose:  "reclassify" step of "raster pipeline"
5
 * Author:   Daniel Baston
6
 *
7
 ******************************************************************************
8
 * Copyright (c) 2025, ISciences, LLC
9
 *
10
 * SPDX-License-Identifier: MIT
11
 ****************************************************************************/
12
13
#ifndef GDALALG_RASTER_RECLASSIFY_INCLUDED
14
#define GDALALG_RASTER_RECLASSIFY_INCLUDED
15
16
#include "gdalrasterpipelinestepalgorithm.h"
17
18
//! @cond Doxygen_Suppress
19
20
/*************gg***********************************************************/
21
/*                     GDALRasterReclassifyAlgorithm                      */
22
/**************************************************************************/
23
24
class GDALRasterReclassifyAlgorithm : public GDALRasterPipelineStepAlgorithm
25
{
26
  public:
27
    static constexpr const char *NAME = "reclassify";
28
    static constexpr const char *DESCRIPTION =
29
        "Reclassify values in a raster dataset";
30
    static constexpr const char *HELP_URL =
31
        "/programs/gdal_raster_reclassify.html";
32
33
    explicit GDALRasterReclassifyAlgorithm(bool standaloneStep = false);
34
35
  private:
36
    bool RunStep(GDALPipelineStepRunContext &ctxt) override;
37
38
    std::string m_mapping{};
39
    std::string m_type{};
40
    bool m_keepColorTable{false};
41
};
42
43
/************************************************************************/
44
/*                 GDALRasterResizeAlgorithmStandalone                  */
45
/************************************************************************/
46
47
class GDALRasterReclassifyAlgorithmStandalone final
48
    : public GDALRasterReclassifyAlgorithm
49
{
50
  public:
51
    GDALRasterReclassifyAlgorithmStandalone()
52
0
        : GDALRasterReclassifyAlgorithm(/* standaloneStep = */ true)
53
0
    {
54
0
    }
55
56
    ~GDALRasterReclassifyAlgorithmStandalone() override;
57
};
58
59
//! @endcond
60
61
#endif /* GDALALG_RASTER_RECLASSIFY_INCLUDED */