LCOV - code coverage report
Current view: top level - apps - gdalalg_raster_overview.h (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 5 8 62.5 %
Date: 2025-05-15 18:21:54 Functions: 1 2 50.0 %

          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             : #include "gdalalg_raster_overview_refresh.h"
      25             : 
      26             : /************************************************************************/
      27             : /*                      GDALRasterOverviewAlgorithm                     */
      28             : /************************************************************************/
      29             : 
      30             : class GDALRasterOverviewAlgorithm final : public GDALAlgorithm
      31             : {
      32             :   public:
      33             :     static constexpr const char *NAME = "overview";
      34             :     static constexpr const char *DESCRIPTION =
      35             :         "Manage overviews of a raster dataset.";
      36             :     static constexpr const char *HELP_URL =
      37             :         "/programs/gdal_raster_overview.html";
      38             : 
      39          36 :     GDALRasterOverviewAlgorithm() : GDALAlgorithm(NAME, DESCRIPTION, HELP_URL)
      40             :     {
      41          36 :         RegisterSubAlgorithm<GDALRasterOverviewAlgorithmAdd>();
      42          36 :         RegisterSubAlgorithm<GDALRasterOverviewAlgorithmDelete>();
      43          36 :         RegisterSubAlgorithm<GDALRasterOverviewAlgorithmRefresh>();
      44          36 :     }
      45             : 
      46             :   private:
      47           0 :     bool RunImpl(GDALProgressFunc, void *) override
      48             :     {
      49           0 :         CPLError(CE_Failure, CPLE_AppDefined,
      50             :                  "The Run() method should not be called directly on the \"gdal "
      51             :                  "raster overview\" program.");
      52           0 :         return false;
      53             :     }
      54             : };
      55             : 
      56             : //! @endcond
      57             : 
      58             : #endif

Generated by: LCOV version 1.14