LCOV - code coverage report
Current view: top level - apps - gdalalg_vector.cpp (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 15 15 100.0 %
Date: 2025-02-20 10:14:44 Functions: 3 3 100.0 %

          Line data    Source code
       1             : /******************************************************************************
       2             :  *
       3             :  * Project:  GDAL
       4             :  * Purpose:  gdal "vector" subcommand
       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             : #include "gdalalgorithm.h"
      14             : 
      15             : #include "gdalalg_vector_info.h"
      16             : #include "gdalalg_vector_clip.h"
      17             : #include "gdalalg_vector_convert.h"
      18             : #include "gdalalg_vector_pipeline.h"
      19             : #include "gdalalg_vector_filter.h"
      20             : #include "gdalalg_vector_reproject.h"
      21             : #include "gdalalg_vector_select.h"
      22             : #include "gdalalg_vector_sql.h"
      23             : 
      24             : /************************************************************************/
      25             : /*                         GDALVectorAlgorithm                          */
      26             : /************************************************************************/
      27             : 
      28             : class GDALVectorAlgorithm final : public GDALAlgorithm
      29             : {
      30             :   public:
      31             :     static constexpr const char *NAME = "vector";
      32             :     static constexpr const char *DESCRIPTION = "Vector commands.";
      33             :     static constexpr const char *HELP_URL = "/programs/gdal_vector.html";
      34             : 
      35        1418 :     static std::vector<std::string> GetAliases()
      36             :     {
      37        1418 :         return {};
      38             :     }
      39             : 
      40         139 :     GDALVectorAlgorithm() : GDALAlgorithm(NAME, DESCRIPTION, HELP_URL)
      41             :     {
      42         139 :         RegisterSubAlgorithm<GDALVectorInfoAlgorithm>();
      43         139 :         RegisterSubAlgorithm<GDALVectorClipAlgorithmStandalone>();
      44         139 :         RegisterSubAlgorithm<GDALVectorConvertAlgorithm>();
      45         139 :         RegisterSubAlgorithm<GDALVectorPipelineAlgorithm>();
      46         139 :         RegisterSubAlgorithm<GDALVectorFilterAlgorithmStandalone>();
      47         139 :         RegisterSubAlgorithm<GDALVectorReprojectAlgorithmStandalone>();
      48         139 :         RegisterSubAlgorithm<GDALVectorSelectAlgorithmStandalone>();
      49         139 :         RegisterSubAlgorithm<GDALVectorSQLAlgorithmStandalone>();
      50         139 :     }
      51             : 
      52             :   private:
      53           1 :     bool RunImpl(GDALProgressFunc, void *) override
      54             :     {
      55           1 :         CPLError(CE_Failure, CPLE_AppDefined,
      56             :                  "The Run() method should not be called directly on the \"gdal "
      57             :                  "vector\" program.");
      58           1 :         return false;
      59             :     }
      60             : };
      61             : 
      62             : GDAL_STATIC_REGISTER_ALG(GDALVectorAlgorithm);

Generated by: LCOV version 1.14