LCOV - code coverage report
Current view: top level - apps - gdalalg_vector_check_coverage.h (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 4 6 66.7 %
Date: 2025-12-21 22:14:19 Functions: 3 4 75.0 %

          Line data    Source code
       1             : /******************************************************************************
       2             : *
       3             :  * Project:  GDAL
       4             :  * Purpose:  "gdal vector check-coverage"
       5             :  * Author:   Daniel Baston
       6             :  *
       7             :  ******************************************************************************
       8             :  * Copyright (c) 2025, ISciences LLC
       9             :  *
      10             :  * SPDX-License-Identifier: MIT
      11             :  ****************************************************************************/
      12             : 
      13             : #ifndef GDALALG_VECTOR_CHECK_COVERAGE_INCLUDED
      14             : #define GDALALG_VECTOR_CHECK_COVERAGE_INCLUDED
      15             : 
      16             : #include "gdalalg_vector_pipeline.h"
      17             : #include "cpl_progress.h"
      18             : 
      19             : #include <string>
      20             : 
      21             : //! @cond Doxygen_Suppress
      22             : 
      23             : /************************************************************************/
      24             : /*                     GDALVectorCheckCoverageAlgorithm                 */
      25             : /************************************************************************/
      26             : 
      27             : class GDALVectorCheckCoverageAlgorithm : public GDALVectorPipelineStepAlgorithm
      28             : {
      29             :   public:
      30             :     static constexpr const char *NAME = "check-coverage";
      31             :     static constexpr const char *DESCRIPTION =
      32             :         "Check a polygon coverage for validity";
      33             :     static constexpr const char *HELP_URL =
      34             :         "/programs/gdal_vector_check_coverage.html";
      35             : 
      36             :     explicit GDALVectorCheckCoverageAlgorithm(bool standaloneStep = false);
      37             : 
      38           0 :     bool IsNativelyStreamingCompatible() const override
      39             :     {
      40           0 :         return false;
      41             :     }
      42             : 
      43             :   private:
      44             :     bool RunStep(GDALPipelineStepRunContext &ctxt) override;
      45             : 
      46             :     std::string m_geomField{};
      47             :     bool m_includeValid{false};
      48             :     double m_maximumGapWidth{};
      49             : };
      50             : 
      51             : /************************************************************************/
      52             : /*                 GDALVectorCheckCoverageAlgorithmStandalone           */
      53             : /************************************************************************/
      54             : 
      55          28 : class GDALVectorCheckCoverageAlgorithmStandalone final
      56             :     : public GDALVectorCheckCoverageAlgorithm
      57             : {
      58             :   public:
      59          14 :     GDALVectorCheckCoverageAlgorithmStandalone()
      60          14 :         : GDALVectorCheckCoverageAlgorithm(/* standaloneStep = */ true)
      61             :     {
      62          14 :     }
      63             : 
      64             :     ~GDALVectorCheckCoverageAlgorithmStandalone() override;
      65             : };
      66             : 
      67             : //! @endcond
      68             : 
      69             : #endif /* GDALALG_VECTOR_CHECK_COVERAGE_INCLUDED */

Generated by: LCOV version 1.14