LCOV - code coverage report
Current view: top level - apps - gdalalg_vector_make_point.h (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 4 4 100.0 %
Date: 2025-10-21 22:35:35 Functions: 3 3 100.0 %

          Line data    Source code
       1             : /******************************************************************************
       2             :  *
       3             :  * Project:  GDAL
       4             :  * Purpose:  "gdal vector make-point"
       5             :  * Author:   Dan Baston
       6             :  *
       7             :  ******************************************************************************
       8             :  * Copyright (c) 2025, ISciences LLC
       9             :  *
      10             :  * SPDX-License-Identifier: MIT
      11             :  ****************************************************************************/
      12             : 
      13             : #ifndef GDALALG_VECTOR_MAKE_POINT_INCLUDED
      14             : #define GDALALG_VECTOR_MAKE_POINT_INCLUDED
      15             : 
      16             : #include "gdalalg_vector_geom.h"
      17             : 
      18             : //! @cond Doxygen_Suppress
      19             : 
      20             : /************************************************************************/
      21             : /*                   GDALVectorMakePointAlgorithm                       */
      22             : /************************************************************************/
      23             : 
      24             : class GDALVectorMakePointAlgorithm /* non final */
      25             :     : public GDALVectorPipelineStepAlgorithm
      26             : {
      27             :   public:
      28             :     static constexpr const char *NAME = "make-point";
      29             :     static constexpr const char *DESCRIPTION =
      30             :         "Create point geometries from attribute fields";
      31             :     static constexpr const char *HELP_URL =
      32             :         "/programs/gdal_vector_make_point.html";
      33             : 
      34             :     explicit GDALVectorMakePointAlgorithm(bool standaloneStep = false);
      35             : 
      36             :   private:
      37             :     bool RunStep(GDALPipelineStepRunContext &ctxt) override;
      38             : 
      39             :     std::string m_xField{};
      40             :     std::string m_yField{};
      41             :     std::string m_zField{};
      42             :     std::string m_mField{};
      43             :     std::string m_dstCrs{};
      44             : };
      45             : 
      46             : /************************************************************************/
      47             : /*                   GDALVectorMakePointAlgorithmStandalone             */
      48             : /************************************************************************/
      49             : 
      50          26 : class GDALVectorMakePointAlgorithmStandalone final
      51             :     : public GDALVectorMakePointAlgorithm
      52             : {
      53             :   public:
      54          13 :     GDALVectorMakePointAlgorithmStandalone()
      55          13 :         : GDALVectorMakePointAlgorithm(/* standaloneStep = */ true)
      56             :     {
      57          13 :     }
      58             : 
      59             :     ~GDALVectorMakePointAlgorithmStandalone() override;
      60             : };
      61             : 
      62             : //! @endcond
      63             : 
      64             : #endif /* GDALALG_VECTOR_MAKE_POINT_INCLUDED */

Generated by: LCOV version 1.14