13#ifndef GDALALG_RASTER_UPDATE_INCLUDED
14#define GDALALG_RASTER_UPDATE_INCLUDED
16#include "gdalalg_raster_pipeline.h"
18#include "gdalalg_clip_common.h"
28class GDALRasterUpdateAlgorithm
29 :
public GDALRasterPipelineStepAlgorithm,
33 static constexpr const char *NAME =
"update";
34 static constexpr const char *DESCRIPTION =
35 "Update the destination raster with the content of the input one.";
36 static constexpr const char *HELP_URL =
"/programs/gdal_raster_update.html";
38 explicit GDALRasterUpdateAlgorithm(
bool standaloneStep =
false);
40 bool CanBeLastStep()
const override
45 bool CanBeMiddleStep()
const override
50 bool IsNativelyStreamingCompatible()
const override
55 bool OutputDatasetAllowedBeforeRunningStep()
const override
61 bool RunImpl(GDALProgressFunc pfnProgress,
void *pProgressData)
override;
62 bool RunStep(GDALPipelineStepRunContext &ctxt)
override;
64 std::string m_resampling{};
65 std::vector<std::string> m_warpOptions{};
66 std::vector<std::string> m_transformOptions{};
67 double m_errorThreshold = std::numeric_limits<double>::quiet_NaN();
68 bool m_noUpdateOverviews =
false;
75class GDALRasterUpdateAlgorithmStandalone final
76 :
public GDALRasterUpdateAlgorithm
79 GDALRasterUpdateAlgorithmStandalone()
80 : GDALRasterUpdateAlgorithm( true)
84 ~GDALRasterUpdateAlgorithmStandalone()
override;