LCOV - code coverage report
Current view: top level - apps - gdalalg_vector_convex_hull.h (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 4 4 100.0 %
Date: 2026-04-03 14:38:35 Functions: 3 3 100.0 %

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

Generated by: LCOV version 1.14