GDAL

gdalalg_raster_unscale.h
1/******************************************************************************
2 *
3 * Project: GDAL
4 * Purpose: "unscale" step of "raster pipeline"
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_UNSCALE_INCLUDED
14#define GDALALG_RASTER_UNSCALE_INCLUDED
15
16#include "gdalalg_raster_pipeline.h"
17
19
20/************************************************************************/
21/* GDALRasterUnscaleAlgorithm */
22/************************************************************************/
23
24 class GDALRasterUnscaleAlgorithm /* non final */
25 : public GDALRasterPipelineStepAlgorithm
26{
27 public:
28 static constexpr const char *NAME = "unscale";
29 static constexpr const char *DESCRIPTION =
30 "Convert scaled values of a raster dataset into unscaled values.";
31 static constexpr const char *HELP_URL =
32 "/programs/gdal_raster_unscale.html";
33
34 explicit GDALRasterUnscaleAlgorithm(bool standaloneStep = false);
35
36 private:
37 bool RunStep(GDALPipelineStepRunContext &ctxt) override;
38
39 std::string m_type{};
40};
41
42/************************************************************************/
43/* GDALRasterUnscaleAlgorithmStandalone */
44/************************************************************************/
45
46 class GDALRasterUnscaleAlgorithmStandalone final
47 : public GDALRasterUnscaleAlgorithm
48{
49 public:
50 GDALRasterUnscaleAlgorithmStandalone()
51 : GDALRasterUnscaleAlgorithm(/* standaloneStep = */ true)
52 {
53 }
54
55 ~GDALRasterUnscaleAlgorithmStandalone() override;
56};
57
59
60#endif /* GDALALG_RASTER_UNSCALE_INCLUDED */