LCOV - code coverage report
Current view: top level - apps - gdalalg_vector_filter.h (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 5 5 100.0 %
Date: 2025-01-18 12:42:00 Functions: 2 2 100.0 %

          Line data    Source code
       1             : /******************************************************************************
       2             :  *
       3             :  * Project:  GDAL
       4             :  * Purpose:  "filter" step of "vector pipeline"
       5             :  * Author:   Even Rouault <even dot rouault at spatialys.com>
       6             :  *
       7             :  ******************************************************************************
       8             :  * Copyright (c) 2024, Even Rouault <even dot rouault at spatialys.com>
       9             :  *
      10             :  * SPDX-License-Identifier: MIT
      11             :  ****************************************************************************/
      12             : 
      13             : #ifndef GDALALG_VECTOR_FILTER_INCLUDED
      14             : #define GDALALG_VECTOR_FILTER_INCLUDED
      15             : 
      16             : #include "gdalalg_vector_pipeline.h"
      17             : 
      18             : //! @cond Doxygen_Suppress
      19             : 
      20             : /************************************************************************/
      21             : /*                    GDALVectorFilterAlgorithm                         */
      22             : /************************************************************************/
      23             : 
      24             : class GDALVectorFilterAlgorithm /* non final */
      25             :     : public GDALVectorPipelineStepAlgorithm
      26             : {
      27             :   public:
      28             :     static constexpr const char *NAME = "filter";
      29             :     static constexpr const char *DESCRIPTION = "Filter a vector dataset.";
      30             :     static constexpr const char *HELP_URL =
      31             :         "/programs/gdal_vector_pipeline.html";
      32             : 
      33         142 :     static std::vector<std::string> GetAliases()
      34             :     {
      35         142 :         return {};
      36             :     }
      37             : 
      38             :     explicit GDALVectorFilterAlgorithm(bool standaloneStep = false);
      39             : 
      40             :   private:
      41             :     bool RunStep(GDALProgressFunc pfnProgress, void *pProgressData) override;
      42             : 
      43             :     std::vector<double> m_bbox{};
      44             : };
      45             : 
      46             : /************************************************************************/
      47             : /*                 GDALVectorFilterAlgorithmStandalone                  */
      48             : /************************************************************************/
      49             : 
      50             : class GDALVectorFilterAlgorithmStandalone final
      51             :     : public GDALVectorFilterAlgorithm
      52             : {
      53             :   public:
      54           3 :     GDALVectorFilterAlgorithmStandalone()
      55           3 :         : GDALVectorFilterAlgorithm(/* standaloneStep = */ true)
      56             :     {
      57           3 :     }
      58             : };
      59             : 
      60             : //! @endcond
      61             : 
      62             : #endif /* GDALALG_VECTOR_FILTER_INCLUDED */

Generated by: LCOV version 1.14