LCOV - code coverage report
Current view: top level - apps - gdalalg_raster.cpp (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 17 17 100.0 %
Date: 2025-02-20 10:14:44 Functions: 3 3 100.0 %

          Line data    Source code
       1             : /******************************************************************************
       2             :  *
       3             :  * Project:  GDAL
       4             :  * Purpose:  gdal "raster" 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             : #include "gdalalgorithm.h"
      14             : 
      15             : #include "gdalalg_raster_info.h"
      16             : #include "gdalalg_raster_calc.h"
      17             : #include "gdalalg_raster_clip.h"
      18             : #include "gdalalg_raster_convert.h"
      19             : #include "gdalalg_raster_edit.h"
      20             : #include "gdalalg_raster_mosaic.h"
      21             : #include "gdalalg_raster_overview.h"
      22             : #include "gdalalg_raster_pipeline.h"
      23             : #include "gdalalg_raster_reproject.h"
      24             : #include "gdalalg_raster_stack.h"
      25             : 
      26             : /************************************************************************/
      27             : /*                         GDALRasterAlgorithm                          */
      28             : /************************************************************************/
      29             : 
      30             : class GDALRasterAlgorithm final : public GDALAlgorithm
      31             : {
      32             :   public:
      33             :     static constexpr const char *NAME = "raster";
      34             :     static constexpr const char *DESCRIPTION = "Raster commands.";
      35             :     static constexpr const char *HELP_URL = "/programs/gdal_raster.html";
      36             : 
      37        1418 :     static std::vector<std::string> GetAliases()
      38             :     {
      39        1418 :         return {};
      40             :     }
      41             : 
      42         203 :     GDALRasterAlgorithm() : GDALAlgorithm(NAME, DESCRIPTION, HELP_URL)
      43             :     {
      44         203 :         RegisterSubAlgorithm<GDALRasterInfoAlgorithm>();
      45         203 :         RegisterSubAlgorithm<GDALRasterCalcAlgorithm>();
      46         203 :         RegisterSubAlgorithm<GDALRasterConvertAlgorithm>();
      47         203 :         RegisterSubAlgorithm<GDALRasterClipAlgorithmStandalone>();
      48         203 :         RegisterSubAlgorithm<GDALRasterEditAlgorithmStandalone>();
      49         203 :         RegisterSubAlgorithm<GDALRasterOverviewAlgorithm>();
      50         203 :         RegisterSubAlgorithm<GDALRasterPipelineAlgorithm>();
      51         203 :         RegisterSubAlgorithm<GDALRasterReprojectAlgorithmStandalone>();
      52         203 :         RegisterSubAlgorithm<GDALRasterMosaicAlgorithm>();
      53         203 :         RegisterSubAlgorithm<GDALRasterStackAlgorithm>();
      54         203 :     }
      55             : 
      56             :   private:
      57           1 :     bool RunImpl(GDALProgressFunc, void *) override
      58             :     {
      59           1 :         CPLError(CE_Failure, CPLE_AppDefined,
      60             :                  "The Run() method should not be called directly on the \"gdal "
      61             :                  "raster\" program.");
      62           1 :         return false;
      63             :     }
      64             : };
      65             : 
      66             : GDAL_STATIC_REGISTER_ALG(GDALRasterAlgorithm);

Generated by: LCOV version 1.14