GDAL

gdalalg_raster_create.h
1/******************************************************************************
2 *
3 * Project: GDAL
4 * Purpose: gdal "raster create" subcommand
5 * Author: Even Rouault <even dot rouault at spatialys.com>
6 *
7 ******************************************************************************
8 * Copyright (c) 2025, Even Rouault <even dot rouault at spatialys.com>
9 *
10 * SPDX-License-Identifier: MIT
11 ****************************************************************************/
12
13#ifndef GDALALG_RASTER_CREATE_INCLUDED
14#define GDALALG_RASTER_CREATE_INCLUDED
15
16#include "gdalalgorithm.h"
17
19
20/************************************************************************/
21/* GDALRasterCreateAlgorithm */
22/************************************************************************/
23
24 class GDALRasterCreateAlgorithm final : public GDALAlgorithm
25{
26 public:
27 static constexpr const char *NAME = "create";
28 static constexpr const char *DESCRIPTION = "Create a new raster dataset.";
29 static constexpr const char *HELP_URL = "/programs/gdal_raster_create.html";
30
31 GDALRasterCreateAlgorithm();
32
33 private:
34 bool RunImpl(GDALProgressFunc pfnProgress, void *pProgressData) override;
35
36 std::string m_outputFormat{};
37 GDALArgDatasetValue m_inputDataset{};
38 std::vector<std::string> m_openOptions{};
39 std::vector<std::string> m_inputFormats{};
40 GDALArgDatasetValue m_outputDataset{};
41 std::vector<std::string> m_creationOptions{};
42 bool m_overwrite = false;
43 bool m_append = false;
44 std::vector<int> m_size{};
45 int m_bandCount = 1;
46 std::string m_type = "Byte";
47 std::string m_crs{};
48 std::vector<double> m_bbox{};
49 std::vector<std::string> m_metadata{};
50 std::string m_nodata{};
51 std::vector<double> m_burnValues{};
52 bool m_copyOverviews = false;
53 bool m_copyMetadata = false;
54};
55
57
58#endif
GDALAlgorithm
GDAL algorithm.
Definition gdalalgorithm_cpp.h:2261
GDALArgDatasetValue
Value for an argument that points to a GDALDataset.
Definition gdalalgorithm_cpp.h:149