GDAL

gdalalg_info.h
1/******************************************************************************
2 *
3 * Project: GDAL
4 * Purpose: gdal "info" 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_INFO_INCLUDED
14#define GDALALG_INFO_INCLUDED
15
17
18#include "gdalalgorithm.h"
19#include "gdalalg_raster_info.h"
20#include "gdalalg_vector_info.h"
21#include "gdalalg_dispatcher.h"
22
23/************************************************************************/
24/* GDALInfoAlgorithm */
25/************************************************************************/
26
27 class GDALInfoAlgorithm final
28 : public GDALDispatcherAlgorithm<GDALRasterInfoAlgorithm,
29 GDALVectorInfoAlgorithm>
30{
31 public:
32 static constexpr const char *NAME = "info";
33 static constexpr const char *DESCRIPTION =
34 "Return information on a dataset (shortcut for 'gdal raster info' or "
35 "'gdal vector info').";
36 static constexpr const char *HELP_URL = "/programs/gdal_info.html";
37
38 GDALInfoAlgorithm();
39
40 private:
41 std::string m_format{};
42 GDALArgDatasetValue m_dataset{};
43
44 bool RunImpl(GDALProgressFunc, void *) override;
45};
46
48
49#endif
GDALArgDatasetValue
Value for an argument that points to a GDALDataset.
Definition gdalalgorithm_cpp.h:149