LCOV - code coverage report
Current view: top level - apps - gdalalg_vector_dissolve.h (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 4 4 100.0 %
Date: 2026-03-13 03:16:58 Functions: 3 3 100.0 %

          Line data    Source code
       1             : /******************************************************************************
       2             : *
       3             :  * Project:  GDAL
       4             :  * Purpose:  "gdal vector dissolve"
       5             :  * Author:   Daniel Baston
       6             :  *
       7             :  ******************************************************************************
       8             :  * Copyright (c) 2025, ISciences LLC
       9             :  *
      10             :  * SPDX-License-Identifier: MIT
      11             :  ****************************************************************************/
      12             : 
      13             : #ifndef GDALALG_VECTOR_DISSOLVE_INCLUDED
      14             : #define GDALALG_VECTOR_DISSOLVE_INCLUDED
      15             : 
      16             : #include "gdalalg_vector_geom.h"
      17             : #include "cpl_progress.h"
      18             : 
      19             : #include <string>
      20             : 
      21             : //! @cond Doxygen_Suppress
      22             : 
      23             : /************************************************************************/
      24             : /*                     GDALVectorDissolveAlgorithm                      */
      25             : /************************************************************************/
      26             : 
      27             : class GDALVectorDissolveAlgorithm : public GDALVectorGeomAbstractAlgorithm
      28             : {
      29             :   public:
      30             :     static constexpr const char *NAME = "dissolve";
      31             :     static constexpr const char *DESCRIPTION = "Dissolves multipart features";
      32             :     static constexpr const char *HELP_URL =
      33             :         "/programs/gdal_vector_dissolve.html";
      34             : 
      35             :     explicit GDALVectorDissolveAlgorithm(bool standaloneStep = false);
      36             : 
      37             :     std::unique_ptr<OGRLayerWithTranslateFeature>
      38             :     CreateAlgLayer(OGRLayer &srcLayer) override;
      39             : 
      40             :     struct Options : OptionsBase
      41             :     {
      42             :     };
      43             : 
      44             :   private:
      45             :     bool RunStep(GDALPipelineStepRunContext &ctxt) override;
      46             : 
      47             :     Options m_opts{};
      48             : };
      49             : 
      50             : /************************************************************************/
      51             : /*                GDALVectorDissolveAlgorithmStandalone                 */
      52             : /************************************************************************/
      53             : 
      54          22 : class GDALVectorDissolveAlgorithmStandalone final
      55             :     : public GDALVectorDissolveAlgorithm
      56             : {
      57             :   public:
      58          11 :     GDALVectorDissolveAlgorithmStandalone()
      59          11 :         : GDALVectorDissolveAlgorithm(/* standaloneStep = */ true)
      60             :     {
      61          11 :     }
      62             : 
      63             :     ~GDALVectorDissolveAlgorithmStandalone() override;
      64             : };
      65             : 
      66             : //! @endcond
      67             : 
      68             : #endif /* GDALALG_VECTOR_DISSOLVE_INCLUDED */

Generated by: LCOV version 1.14