Line data Source code
1 : /****************************************************************************** 2 : * 3 : * Project: GDAL 4 : * Purpose: gdal "raster overview" 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_OVERVIEW_INCLUDED 14 : #define GDALALG_RASTER_OVERVIEW_INCLUDED 15 : 16 : #include "gdalalgorithm.h" 17 : 18 : //! @cond Doxygen_Suppress 19 : 20 : #include "gdalalgorithm.h" 21 : 22 : #include "gdalalg_raster_overview_add.h" 23 : #include "gdalalg_raster_overview_delete.h" 24 : 25 : /************************************************************************/ 26 : /* GDALRasterOverviewAlgorithm */ 27 : /************************************************************************/ 28 : 29 : class GDALRasterOverviewAlgorithm final : public GDALAlgorithm 30 : { 31 : public: 32 : static constexpr const char *NAME = "overview"; 33 : static constexpr const char *DESCRIPTION = 34 : "Manage overviews of a raster dataset."; 35 : static constexpr const char *HELP_URL = 36 : "/programs/gdal_raster_overview.html"; 37 : 38 168 : static std::vector<std::string> GetAliases() 39 : { 40 168 : return {}; 41 : } 42 : 43 13 : GDALRasterOverviewAlgorithm() : GDALAlgorithm(NAME, DESCRIPTION, HELP_URL) 44 : { 45 13 : RegisterSubAlgorithm<GDALRasterOverviewAlgorithmAdd>(); 46 13 : RegisterSubAlgorithm<GDALRasterOverviewAlgorithmDelete>(); 47 13 : } 48 : 49 : private: 50 0 : bool RunImpl(GDALProgressFunc, void *) override 51 : { 52 0 : CPLError(CE_Failure, CPLE_AppDefined, 53 : "The Run() method should not be called directly on the \"gdal " 54 : "raster overview\" program."); 55 0 : return false; 56 : } 57 : }; 58 : 59 : //! @endcond 60 : 61 : #endif