/src/gdal/apps/gdalalg_info.cpp
Line | Count | Source |
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 | | //! @cond Doxygen_Suppress |
14 | | |
15 | | #include "cpl_error.h" |
16 | | #include "gdalalg_info.h" |
17 | | #include "gdalalg_raster_info.h" |
18 | | #include "gdalalg_vector_info.h" |
19 | | #include "gdalalg_dispatcher.h" |
20 | | #include "gdal_priv.h" |
21 | | |
22 | | /************************************************************************/ |
23 | | /* GDALInfoAlgorithm */ |
24 | | /************************************************************************/ |
25 | | |
26 | | GDALInfoAlgorithm::GDALInfoAlgorithm() |
27 | 0 | : GDALDispatcherAlgorithm(NAME, DESCRIPTION, HELP_URL) |
28 | 0 | { |
29 | | // only for the help message |
30 | 0 | AddOutputFormatArg(&m_format).SetChoices("json", "text"); |
31 | 0 | AddInputDatasetArg(&m_dataset); |
32 | |
|
33 | 0 | m_longDescription = "For all options, run 'gdal raster info --help' or " |
34 | 0 | "'gdal vector info --help'"; |
35 | 0 | } |
36 | | |
37 | | bool GDALInfoAlgorithm::RunImpl(GDALProgressFunc, void *) |
38 | 0 | { |
39 | 0 | CPLError(CE_Failure, CPLE_AppDefined, |
40 | 0 | "The Run() method should not be called directly on the \"gdal " |
41 | 0 | "info\" program."); |
42 | 0 | return false; |
43 | 0 | } |
44 | | |
45 | | //! @endcond |