Line data Source code
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 41 : GDALInfoAlgorithm::GDALInfoAlgorithm() 27 41 : : GDALDispatcherAlgorithm(NAME, DESCRIPTION, HELP_URL) 28 : { 29 : // only for the help message 30 41 : AddOutputFormatArg(&m_format).SetChoices("json", "text"); 31 41 : AddInputDatasetArg(&m_dataset); 32 : 33 : m_longDescription = "For all options, run 'gdal raster info --help' or " 34 41 : "'gdal vector info --help'"; 35 41 : } 36 : 37 2 : bool GDALInfoAlgorithm::RunImpl(GDALProgressFunc, void *) 38 : { 39 2 : CPLError(CE_Failure, CPLE_AppDefined, 40 : "The Run() method should not be called directly on the \"gdal " 41 : "info\" program."); 42 2 : return false; 43 : } 44 : 45 : //! @endcond