LCOV - code coverage report
Current view: top level - apps - gdalalg_raster_mosaic.h (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 6 6 100.0 %
Date: 2025-06-19 12:30:01 Functions: 4 4 100.0 %

          Line data    Source code
       1             : /******************************************************************************
       2             :  *
       3             :  * Project:  GDAL
       4             :  * Purpose:  gdal "raster mosaic" 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             : #ifndef GDALALG_RASTER_MOSAIC_INCLUDED
      14             : #define GDALALG_RASTER_MOSAIC_INCLUDED
      15             : 
      16             : #include "gdalalg_raster_mosaic_stack_common.h"
      17             : 
      18             : //! @cond Doxygen_Suppress
      19             : 
      20             : /************************************************************************/
      21             : /*                     GDALRasterMosaicAlgorithm                        */
      22             : /************************************************************************/
      23             : 
      24             : class GDALRasterMosaicAlgorithm /* non final */
      25             :     : public GDALRasterMosaicStackCommonAlgorithm
      26             : {
      27             :   public:
      28             :     static constexpr const char *NAME = "mosaic";
      29             :     static constexpr const char *DESCRIPTION =
      30             :         "Build a mosaic, either virtual (VRT) or materialized.";
      31             :     static constexpr const char *HELP_URL = "/programs/gdal_raster_mosaic.html";
      32             : 
      33             :     explicit GDALRasterMosaicAlgorithm(bool bStandalone = false);
      34             : 
      35          11 :     bool CanBeFirstStep() const override
      36             :     {
      37          11 :         return true;
      38             :     }
      39             : 
      40             :   private:
      41             :     bool RunStep(GDALPipelineStepRunContext &ctxt) override;
      42             : 
      43             :     bool m_addAlpha = false;
      44             :     std::string m_pixelFunction{};
      45             :     std::vector<std::string> m_pixelFunctionArgs{};
      46             : };
      47             : 
      48             : /************************************************************************/
      49             : /*                   GDALRasterMosaicAlgorithmStandalone                */
      50             : /************************************************************************/
      51             : 
      52          86 : class GDALRasterMosaicAlgorithmStandalone final
      53             :     : public GDALRasterMosaicAlgorithm
      54             : {
      55             :   public:
      56          43 :     GDALRasterMosaicAlgorithmStandalone()
      57          43 :         : GDALRasterMosaicAlgorithm(/* standaloneStep = */ true)
      58             :     {
      59          43 :     }
      60             : 
      61             :     ~GDALRasterMosaicAlgorithmStandalone() override;
      62             : };
      63             : 
      64             : //! @endcond
      65             : 
      66             : #endif

Generated by: LCOV version 1.14