/src/gdal/apps/gdalalg_raster_pipeline.h
Line | Count | Source |
1 | | /****************************************************************************** |
2 | | * |
3 | | * Project: GDAL |
4 | | * Purpose: gdal "raster pipeline" subcommand |
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_PIPELINE_INCLUDED |
14 | | #define GDALALG_RASTER_PIPELINE_INCLUDED |
15 | | |
16 | | #include "gdalalgorithm.h" |
17 | | #include "gdalalg_abstract_pipeline.h" |
18 | | |
19 | | //! @cond Doxygen_Suppress |
20 | | |
21 | | /************************************************************************/ |
22 | | /* GDALRasterPipelineStepAlgorithm */ |
23 | | /************************************************************************/ |
24 | | |
25 | | class GDALRasterAlgorithmStepRegistry; |
26 | | |
27 | | class GDALRasterPipelineStepAlgorithm /* non final */ |
28 | | : public GDALPipelineStepAlgorithm |
29 | | { |
30 | | public: |
31 | | ~GDALRasterPipelineStepAlgorithm() override; |
32 | | |
33 | | protected: |
34 | | GDALRasterPipelineStepAlgorithm(const std::string &name, |
35 | | const std::string &description, |
36 | | const std::string &helpURL, |
37 | | bool standaloneStep); |
38 | | |
39 | | GDALRasterPipelineStepAlgorithm(const std::string &name, |
40 | | const std::string &description, |
41 | | const std::string &helpURL, |
42 | | const ConstructorOptions &options); |
43 | | |
44 | | friend class GDALRasterPipelineAlgorithm; |
45 | | friend class GDALRasterMosaicStackCommonAlgorithm; |
46 | | |
47 | | int GetInputType() const override |
48 | 0 | { |
49 | 0 | return GDAL_OF_RASTER; |
50 | 0 | } |
51 | | |
52 | | int GetOutputType() const override |
53 | 0 | { |
54 | 0 | return GDAL_OF_RASTER; |
55 | 0 | } |
56 | | |
57 | | void SetOutputVRTCompatible(bool b); |
58 | | }; |
59 | | |
60 | | /************************************************************************/ |
61 | | /* GDALRasterPipelineNonNativelyStreamingAlgorithm */ |
62 | | /************************************************************************/ |
63 | | |
64 | | class GDALRasterPipelineNonNativelyStreamingAlgorithm /* non-final */ |
65 | | : public GDALRasterPipelineStepAlgorithm |
66 | | { |
67 | | protected: |
68 | | GDALRasterPipelineNonNativelyStreamingAlgorithm( |
69 | | const std::string &name, const std::string &description, |
70 | | const std::string &helpURL, bool standaloneStep); |
71 | | |
72 | | bool IsNativelyStreamingCompatible() const override; |
73 | | |
74 | | static std::unique_ptr<GDALDataset> |
75 | | CreateTemporaryDataset(int nWidth, int nHeight, int nBands, |
76 | | GDALDataType eDT, bool bTiledIfPossible, |
77 | | GDALDataset *poSrcDSForMetadata, |
78 | | bool bCopyMetadata = true); |
79 | | static std::unique_ptr<GDALDataset> |
80 | | CreateTemporaryCopy(GDALAlgorithm *poAlg, GDALDataset *poSrcDS, |
81 | | int nSingleBand, bool bTiledIfPossible, |
82 | | GDALProgressFunc pfnProgress, void *pProgressData); |
83 | | }; |
84 | | |
85 | | /************************************************************************/ |
86 | | /* GDALRasterAlgorithmStepRegistry */ |
87 | | /************************************************************************/ |
88 | | |
89 | | class GDALRasterAlgorithmStepRegistry : public virtual GDALAlgorithmRegistry |
90 | | { |
91 | | public: |
92 | 0 | GDALRasterAlgorithmStepRegistry() = default; Unexecuted instantiation: GDALRasterAlgorithmStepRegistry::GDALRasterAlgorithmStepRegistry() Unexecuted instantiation: GDALRasterAlgorithmStepRegistry::GDALRasterAlgorithmStepRegistry() |
93 | | ~GDALRasterAlgorithmStepRegistry() override; |
94 | | |
95 | | /** Register the algorithm of type MyAlgorithm. |
96 | | */ |
97 | | template <class MyAlgorithm> |
98 | | bool Register(const std::string &name = std::string()) |
99 | 0 | { |
100 | 0 | static_assert( |
101 | 0 | std::is_base_of_v<GDALRasterPipelineStepAlgorithm, MyAlgorithm>, |
102 | 0 | "Algorithm is not a GDALRasterPipelineStepAlgorithm"); |
103 | |
|
104 | 0 | AlgInfo info; |
105 | 0 | info.m_name = name.empty() ? MyAlgorithm::NAME : name; |
106 | 0 | info.m_aliases = MyAlgorithm::GetAliasesStatic(); |
107 | 0 | info.m_creationFunc = []() -> std::unique_ptr<GDALAlgorithm> |
108 | 0 | { return std::make_unique<MyAlgorithm>(); };Unexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterReadAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterCalcAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterCreateAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterNeighborsAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterWriteAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterInfoAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterAspectAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterBlendAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterClipAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterColorMapAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterCompareAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterEditAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterNoDataToAlphaAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterFillNodataAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterHillshadeAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALMaterializeRasterAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterMosaicAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterOverviewAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterPansharpenAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterProximityAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterReclassifyAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterReprojectAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterResizeAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterRGBToPaletteAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterRoughnessAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterScaleAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterSelectAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterSetTypeAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterSieveAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterSlopeAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterStackAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterTileAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterTPIAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterTRIAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterUnscaleAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterUpdateAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALRasterViewshedAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() constUnexecuted instantiation: GDALRasterAlgorithmStepRegistry::Register<GDALTeeRasterAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::{lambda()#1}::operator()() const |
109 | 0 | return GDALAlgorithmRegistry::Register(info); |
110 | 0 | } Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterReadAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterCalcAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterCreateAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterNeighborsAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterWriteAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterInfoAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterAspectAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterBlendAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterClipAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterColorMapAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterCompareAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterEditAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterNoDataToAlphaAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterFillNodataAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterHillshadeAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALMaterializeRasterAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterMosaicAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterOverviewAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterPansharpenAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterProximityAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterReclassifyAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterReprojectAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterResizeAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterRGBToPaletteAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterRoughnessAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterScaleAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterSelectAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterSetTypeAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterSieveAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterSlopeAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterStackAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterTileAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterTPIAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterTRIAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterUnscaleAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterUpdateAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALRasterViewshedAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) Unexecuted instantiation: bool GDALRasterAlgorithmStepRegistry::Register<GDALTeeRasterAlgorithm>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) |
111 | | }; |
112 | | |
113 | | /************************************************************************/ |
114 | | /* GDALRasterPipelineAlgorithm */ |
115 | | /************************************************************************/ |
116 | | |
117 | | class GDALRasterPipelineAlgorithm final : public GDALAbstractPipelineAlgorithm |
118 | | { |
119 | | public: |
120 | | static constexpr const char *NAME = "pipeline"; |
121 | | static constexpr const char *DESCRIPTION = |
122 | | "Process a raster dataset applying several steps."; |
123 | | static constexpr const char *HELP_URL = |
124 | | "/programs/gdal_raster_pipeline.html"; |
125 | | |
126 | | static std::vector<std::string> GetAliasesStatic() |
127 | 0 | { |
128 | 0 | return { |
129 | 0 | #ifdef GDAL_PIPELINE_PROJ_NOSTALGIA |
130 | 0 | GDALAlgorithmRegistry::HIDDEN_ALIAS_SEPARATOR, |
131 | 0 | "+pipeline", |
132 | 0 | "+gdal=pipeline", |
133 | 0 | #endif |
134 | 0 | }; |
135 | 0 | } |
136 | | |
137 | | explicit GDALRasterPipelineAlgorithm(bool openForMixedRasterVector = false); |
138 | | |
139 | | std::string GetUsageForCLI(bool shortUsage, |
140 | | const UsageOptions &usageOptions) const override; |
141 | | |
142 | | static void RegisterAlgorithms(GDALRasterAlgorithmStepRegistry ®istry, |
143 | | bool forMixedPipeline); |
144 | | |
145 | | int GetInputType() const override |
146 | 0 | { |
147 | 0 | return GDAL_OF_RASTER; |
148 | 0 | } |
149 | | |
150 | | int GetOutputType() const override |
151 | 0 | { |
152 | 0 | return GDAL_OF_RASTER; |
153 | 0 | } |
154 | | |
155 | | protected: |
156 | | GDALRasterAlgorithmStepRegistry m_stepRegistry{}; |
157 | | |
158 | | GDALAlgorithmRegistry &GetStepRegistry() override |
159 | 0 | { |
160 | 0 | return m_stepRegistry; |
161 | 0 | } |
162 | | |
163 | | const GDALAlgorithmRegistry &GetStepRegistry() const override |
164 | 0 | { |
165 | 0 | return m_stepRegistry; |
166 | 0 | } |
167 | | |
168 | | private: |
169 | | std::unique_ptr<GDALAbstractPipelineAlgorithm> |
170 | | CreateNestedPipeline() const override |
171 | 0 | { |
172 | 0 | auto pipeline = std::make_unique<GDALRasterPipelineAlgorithm>(); |
173 | 0 | pipeline->m_bInnerPipeline = true; |
174 | 0 | return pipeline; |
175 | 0 | } |
176 | | }; |
177 | | |
178 | | //! @endcond |
179 | | |
180 | | #endif |