forked from OSGeo/gdal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgdalalg_raster.cpp
62 lines (54 loc) · 2.2 KB
/
gdalalg_raster.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/******************************************************************************
*
* Project: GDAL
* Purpose: gdal "raster" subcommand
* Author: Even Rouault <even dot rouault at spatialys.com>
*
******************************************************************************
* Copyright (c) 2024, Even Rouault <even dot rouault at spatialys.com>
*
* SPDX-License-Identifier: MIT
****************************************************************************/
#include "gdalalgorithm.h"
#include "gdalalg_raster_buildvrt.h"
#include "gdalalg_raster_info.h"
#include "gdalalg_raster_clip.h"
#include "gdalalg_raster_convert.h"
#include "gdalalg_raster_edit.h"
#include "gdalalg_raster_overview.h"
#include "gdalalg_raster_pipeline.h"
#include "gdalalg_raster_reproject.h"
/************************************************************************/
/* GDALRasterAlgorithm */
/************************************************************************/
class GDALRasterAlgorithm final : public GDALAlgorithm
{
public:
static constexpr const char *NAME = "raster";
static constexpr const char *DESCRIPTION = "Raster commands.";
static constexpr const char *HELP_URL = "/programs/gdal_raster.html";
static std::vector<std::string> GetAliases()
{
return {};
}
GDALRasterAlgorithm() : GDALAlgorithm(NAME, DESCRIPTION, HELP_URL)
{
RegisterSubAlgorithm<GDALRasterInfoAlgorithm>();
RegisterSubAlgorithm<GDALRasterConvertAlgorithm>();
RegisterSubAlgorithm<GDALRasterClipAlgorithmStandalone>();
RegisterSubAlgorithm<GDALRasterEditAlgorithmStandalone>();
RegisterSubAlgorithm<GDALRasterOverviewAlgorithm>();
RegisterSubAlgorithm<GDALRasterPipelineAlgorithm>();
RegisterSubAlgorithm<GDALRasterReprojectAlgorithmStandalone>();
RegisterSubAlgorithm<GDALRasterBuildVRTAlgorithm>();
}
private:
bool RunImpl(GDALProgressFunc, void *) override
{
CPLError(CE_Failure, CPLE_AppDefined,
"The Run() method should not be called directly on the \"gdal "
"raster\" program.");
return false;
}
};
GDAL_STATIC_REGISTER_ALG(GDALRasterAlgorithm);