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 "gdalvectorpipelinestepalgorithm.h" 17 : 18 : #include "cpl_progress.h" 19 : 20 : #include <string> 21 : 22 : //! @cond Doxygen_Suppress 23 : 24 : /************************************************************************/ 25 : /* GDALVectorCheckCoverageAlgorithm */ 26 : /************************************************************************/ 27 : 28 : class GDALVectorCheckCoverageAlgorithm : public GDALVectorPipelineStepAlgorithm 29 : { 30 : public: 31 : static constexpr const char *NAME = "check-coverage"; 32 : static constexpr const char *DESCRIPTION = 33 : "Check a polygon coverage for validity"; 34 : static constexpr const char *HELP_URL = 35 : "/programs/gdal_vector_check_coverage.html"; 36 : 37 : explicit GDALVectorCheckCoverageAlgorithm(bool standaloneStep = false); 38 : 39 0 : bool IsNativelyStreamingCompatible() const override 40 : { 41 0 : return false; 42 : } 43 : 44 : private: 45 : bool RunStep(GDALPipelineStepRunContext &ctxt) override; 46 : 47 : std::string m_geomField{}; 48 : bool m_includeValid{false}; 49 : double m_maximumGapWidth{}; 50 : }; 51 : 52 : /************************************************************************/ 53 : /* GDALVectorCheckCoverageAlgorithmStandalone */ 54 : /************************************************************************/ 55 : 56 110 : class GDALVectorCheckCoverageAlgorithmStandalone final 57 : : public GDALVectorCheckCoverageAlgorithm 58 : { 59 : public: 60 55 : GDALVectorCheckCoverageAlgorithmStandalone() 61 55 : : GDALVectorCheckCoverageAlgorithm(/* standaloneStep = */ true) 62 : { 63 55 : } 64 : 65 : ~GDALVectorCheckCoverageAlgorithmStandalone() override; 66 : }; 67 : 68 : //! @endcond 69 : 70 : #endif /* GDALALG_VECTOR_CHECK_COVERAGE_INCLUDED */