GDAL
gdalalg_raster_write.h
1/******************************************************************************
2 *
3 * Project: GDAL
4 * Purpose: "write" step of "raster pipeline"
5 * Author: Even Rouault <even dot rouault at spatialys.com>
6 *
7 ******************************************************************************
8 * Copyright (c) 2024, Even Rouault <even dot rouault at spatialys.com>
9 *
10 * SPDX-License-Identifier: MIT
11 ****************************************************************************/
12
13#ifndef GDALALG_RASTER_WRITE_INCLUDED
14#define GDALALG_RASTER_WRITE_INCLUDED
15
16#include "gdalalg_raster_pipeline.h"
17
19
20/************************************************************************/
21/* GDALRasterWriteAlgorithm */
22/************************************************************************/
23
24class GDALRasterWriteAlgorithm final : public GDALRasterPipelineStepAlgorithm
25{
26 public:
27 static constexpr const char *NAME = "write";
28 static constexpr const char *DESCRIPTION = "Write a raster dataset.";
29 static constexpr const char *HELP_URL =
30 "/programs/gdal_raster_pipeline.html";
31
32 GDALRasterWriteAlgorithm();
33
34 bool CanBeLastStep() const override
35 {
36 return true;
37 }
38
39 bool GeneratesFilesFromUserInput() const override
40 {
41 return true;
42 }
43
44 bool IsNativelyStreamingCompatible() const override
45 {
46 return false;
47 }
48
49 private:
50 friend class GDALRasterPipelineStepAlgorithm;
51 bool RunStep(GDALPipelineStepRunContext &ctxt) override;
52};
53
55
56#endif /* GDALALG_RASTER_WRITE_INCLUDED */