LCOV - code coverage report
Current view: top level - apps - gdalalg_vector.cpp (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 18 18 100.0 %
Date: 2025-03-28 11:40:40 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_edit.h"
      19             : #include "gdalalg_vector_geom.h"
      20             : #include "gdalalg_vector_pipeline.h"
      21             : #include "gdalalg_vector_rasterize.h"
      22             : #include "gdalalg_vector_filter.h"
      23             : #include "gdalalg_vector_reproject.h"
      24             : #include "gdalalg_vector_select.h"
      25             : #include "gdalalg_vector_sql.h"
      26             : 
      27             : /************************************************************************/
      28             : /*                         GDALVectorAlgorithm                          */
      29             : /************************************************************************/
      30             : 
      31             : class GDALVectorAlgorithm final : public GDALAlgorithm
      32             : {
      33             :   public:
      34             :     static constexpr const char *NAME = "vector";
      35             :     static constexpr const char *DESCRIPTION = "Vector commands.";
      36             :     static constexpr const char *HELP_URL = "/programs/gdal_vector.html";
      37             : 
      38        1419 :     static std::vector<std::string> GetAliases()
      39             :     {
      40        1419 :         return {};
      41             :     }
      42             : 
      43         242 :     GDALVectorAlgorithm() : GDALAlgorithm(NAME, DESCRIPTION, HELP_URL)
      44             :     {
      45         242 :         RegisterSubAlgorithm<GDALVectorInfoAlgorithm>();
      46         242 :         RegisterSubAlgorithm<GDALVectorClipAlgorithmStandalone>();
      47         242 :         RegisterSubAlgorithm<GDALVectorConvertAlgorithm>();
      48         242 :         RegisterSubAlgorithm<GDALVectorEditAlgorithmStandalone>();
      49         242 :         RegisterSubAlgorithm<GDALVectorRasterizeAlgorithm>();
      50         242 :         RegisterSubAlgorithm<GDALVectorPipelineAlgorithm>();
      51         242 :         RegisterSubAlgorithm<GDALVectorFilterAlgorithmStandalone>();
      52         242 :         RegisterSubAlgorithm<GDALVectorGeomAlgorithmStandalone>();
      53         242 :         RegisterSubAlgorithm<GDALVectorReprojectAlgorithmStandalone>();
      54         242 :         RegisterSubAlgorithm<GDALVectorSelectAlgorithmStandalone>();
      55         242 :         RegisterSubAlgorithm<GDALVectorSQLAlgorithmStandalone>();
      56         242 :     }
      57             : 
      58             :   private:
      59           1 :     bool RunImpl(GDALProgressFunc, void *) override
      60             :     {
      61           1 :         CPLError(CE_Failure, CPLE_AppDefined,
      62             :                  "The Run() method should not be called directly on the \"gdal "
      63             :                  "vector\" program.");
      64           1 :         return false;
      65             :     }
      66             : };
      67             : 
      68             : GDAL_STATIC_REGISTER_ALG(GDALVectorAlgorithm);

Generated by: LCOV version 1.14