GDAL

gdalalg_raster_update.h
1/******************************************************************************
2 *
3 * Project: GDAL
4 * Purpose: gdal "raster update" 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_UPDATE_INCLUDED
14#define GDALALG_RASTER_UPDATE_INCLUDED
15
16#include "gdalalgorithm.h"
17
18#include "gdalalg_clip_common.h"
19
20#include <limits>
21
23
24/************************************************************************/
25/* GDALRasterUpdateAlgorithm */
26/************************************************************************/
27
28 class GDALRasterUpdateAlgorithm final : public GDALAlgorithm,
29 public GDALClipCommon
30{
31 public:
32 static constexpr const char *NAME = "update";
33 static constexpr const char *DESCRIPTION =
34 "Update the destination raster with the content of the input one.";
35 static constexpr const char *HELP_URL = "/programs/gdal_raster_update.html";
36
37 explicit GDALRasterUpdateAlgorithm();
38
39 private:
40 bool RunImpl(GDALProgressFunc pfnProgress, void *pProgressData) override;
41
42 GDALArgDatasetValue m_inputDataset{};
43 std::vector<std::string> m_openOptions{};
44 std::vector<std::string> m_inputFormats{};
45
46 GDALArgDatasetValue m_outputDataset{};
47 bool m_update = true;
48
49 std::string m_resampling{};
50 std::vector<std::string> m_warpOptions{};
51 std::vector<std::string> m_transformOptions{};
52 double m_errorThreshold = std::numeric_limits<double>::quiet_NaN();
53 bool m_noUpdateOverviews = false;
54};
55
57
58#endif
GDALAlgorithm
GDAL algorithm.
Definition gdalalgorithm_cpp.h:2261
GDALArgDatasetValue
Value for an argument that points to a GDALDataset.
Definition gdalalgorithm_cpp.h:149