LCOV - code coverage report
Current view: top level - apps - gdalalg_raster_aspect.h (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 3 3 100.0 %
Date: 2025-04-16 00:42:22 Functions: 1 1 100.0 %

          Line data    Source code
       1             : /******************************************************************************
       2             :  *
       3             :  * Project:  GDAL
       4             :  * Purpose:  "aspect" step of "raster pipeline"
       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_ASPECT_INCLUDED
      14             : #define GDALALG_RASTER_ASPECT_INCLUDED
      15             : 
      16             : #include "gdalalg_raster_pipeline.h"
      17             : 
      18             : #include <limits>
      19             : 
      20             : //! @cond Doxygen_Suppress
      21             : 
      22             : /************************************************************************/
      23             : /*                       GDALRasterAspectAlgorithm                      */
      24             : /************************************************************************/
      25             : 
      26             : class GDALRasterAspectAlgorithm /* non final */
      27             :     : public GDALRasterPipelineStepAlgorithm
      28             : {
      29             :   public:
      30             :     static constexpr const char *NAME = "aspect";
      31             :     static constexpr const char *DESCRIPTION = "Generate an aspect map";
      32             :     static constexpr const char *HELP_URL = "/programs/gdal_raster_aspect.html";
      33             : 
      34             :     explicit GDALRasterAspectAlgorithm(bool standaloneStep = false);
      35             : 
      36             :   private:
      37             :     bool RunStep(GDALProgressFunc pfnProgress, void *pProgressData) override;
      38             : 
      39             :     int m_band = 1;
      40             :     std::string m_convention = "azimuth";
      41             :     std::string m_gradientAlg = "Horn";
      42             :     bool m_zeroForFlat = false;
      43             :     bool m_noEdges = false;
      44             : };
      45             : 
      46             : /************************************************************************/
      47             : /*                 GDALRasterAspectAlgorithmStandalone                  */
      48             : /************************************************************************/
      49             : 
      50             : class GDALRasterAspectAlgorithmStandalone final
      51             :     : public GDALRasterAspectAlgorithm
      52             : {
      53             :   public:
      54          13 :     GDALRasterAspectAlgorithmStandalone()
      55          13 :         : GDALRasterAspectAlgorithm(/* standaloneStep = */ true)
      56             :     {
      57          13 :     }
      58             : };
      59             : 
      60             : //! @endcond
      61             : 
      62             : #endif /* GDALALG_RASTER_ASPECT_INCLUDED */

Generated by: LCOV version 1.14