13#ifndef GDALALG_VECTOR_UPDATE_INCLUDED
14#define GDALALG_VECTOR_UPDATE_INCLUDED
16#include "gdalalg_vector_pipeline.h"
24class GDALVectorUpdateAlgorithm
25 :
public GDALVectorPipelineStepAlgorithm
28 static constexpr const char *NAME =
"update";
29 static constexpr const char *DESCRIPTION =
30 "Update an existing vector dataset with an input vector dataset.";
31 static constexpr const char *HELP_URL =
"/programs/gdal_vector_update.html";
33 explicit GDALVectorUpdateAlgorithm(
bool standaloneStep =
false);
35 bool IsNativelyStreamingCompatible()
const override
40 bool OutputDatasetAllowedBeforeRunningStep()
const override
46 bool RunStep(GDALPipelineStepRunContext &ctxt)
override;
48 std::string m_activeLayer{};
50 static constexpr const char *MODE_MERGE =
"merge";
51 static constexpr const char *MODE_UPDATE_ONLY =
"update-only";
52 static constexpr const char *MODE_APPEND_ONLY =
"append-only";
54 std::string m_mode{MODE_MERGE};
55 std::vector<std::string> m_key{};
62class GDALVectorUpdateAlgorithmStandalone final
63 :
public GDALVectorUpdateAlgorithm
66 GDALVectorUpdateAlgorithmStandalone()
67 : GDALVectorUpdateAlgorithm( true)
71 ~GDALVectorUpdateAlgorithmStandalone()
override;
74 bool RunImpl(GDALProgressFunc pfnProgress,
void *pProgressData)
override;