LCOV - code coverage report
Current view: top level - apps - gdalalg_raster_reclassify.h (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 3 3 100.0 %
Date: 2025-05-15 18:21:54 Functions: 1 1 100.0 %

          Line data    Source code
       1             : /******************************************************************************
       2             : *
       3             :  * Project:  GDAL
       4             :  * Purpose:  "reclassify" step of "raster pipeline"
       5             :  * Author:   Daniel Baston
       6             :  *
       7             :  ******************************************************************************
       8             :  * Copyright (c) 2025, ISciences, LLC
       9             :  *
      10             :  * SPDX-License-Identifier: MIT
      11             :  ****************************************************************************/
      12             : 
      13             : #ifndef GDALALG_RASTER_RECLASSIFY_INCLUDED
      14             : #define GDALALG_RASTER_RECLASSIFY_INCLUDED
      15             : 
      16             : #include "gdalalg_raster_pipeline.h"
      17             : 
      18             : //! @cond Doxygen_Suppress
      19             : 
      20             : /*************gg***********************************************************/
      21             : /*                     GDALRasterReclassifyAlgorithm                      */
      22             : /**************************************************************************/
      23             : 
      24             : class GDALRasterReclassifyAlgorithm : public GDALRasterPipelineStepAlgorithm
      25             : {
      26             :   public:
      27             :     static constexpr const char *NAME = "reclassify";
      28             :     static constexpr const char *DESCRIPTION =
      29             :         "Reclassify values in a raster dataset";
      30             :     static constexpr const char *HELP_URL =
      31             :         "/programs/gdal_raster_reclassify.html";
      32             : 
      33             :     explicit GDALRasterReclassifyAlgorithm(bool standaloneStep = false);
      34             : 
      35             :   private:
      36             :     bool RunStep(GDALProgressFunc pfnProgress, void *pProgressData) override;
      37             : 
      38             :     std::string m_mapping{};
      39             :     std::string m_type{};
      40             : };
      41             : 
      42             : /************************************************************************/
      43             : /*                  GDALRasterResizeAlgorithmStandalone                 */
      44             : /************************************************************************/
      45             : 
      46             : class GDALRasterReclassifyAlgorithmStandalone final
      47             :     : public GDALRasterReclassifyAlgorithm
      48             : {
      49             :   public:
      50          15 :     GDALRasterReclassifyAlgorithmStandalone()
      51          15 :         : GDALRasterReclassifyAlgorithm(/* standaloneStep = */ true)
      52             :     {
      53          15 :     }
      54             : };
      55             : 
      56             : //! @endcond
      57             : 
      58             : #endif /* GDALALG_RASTER_RECLASSIFY_INCLUDED */

Generated by: LCOV version 1.14