Coverage Report

Created: 2026-02-14 06:52

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/gdal/apps/gdalalg_vector_grid_nearest.h
Line
Count
Source
1
/******************************************************************************
2
 *
3
 * Project:  GDAL
4
 * Purpose:  gdal "vector grid nearest" subcommand
5
 * Author:   Even Rouault <even dot rouault at spatialys.com>
6
 *
7
 ******************************************************************************
8
 * Copyright (c) 2025, Even Rouault <even dot rouault at spatialys.com>
9
 *
10
 * SPDX-License-Identifier: MIT
11
 ****************************************************************************/
12
13
#ifndef GDALALG_VECTOR_GRID_NEAREST_INCLUDED
14
#define GDALALG_VECTOR_GRID_NEAREST_INCLUDED
15
16
#include "gdalalg_vector_grid.h"
17
18
//! @cond Doxygen_Suppress
19
20
/************************************************************************/
21
/*                    GDALVectorGridNearestAlgorithm                    */
22
/************************************************************************/
23
24
class GDALVectorGridNearestAlgorithm /* non final */
25
    : public GDALVectorGridAbstractAlgorithm
26
{
27
  public:
28
    static constexpr const char *NAME = "nearest";
29
    static constexpr const char *DESCRIPTION =
30
        "Create a regular grid from scattered points using nearest neighbor "
31
        "interpolation.";
32
    static constexpr const char *HELP_URL = "/programs/gdal_vector_grid.html";
33
34
    explicit GDALVectorGridNearestAlgorithm(bool standaloneStep = false);
35
36
    std::string GetGridAlgorithm() const override;
37
};
38
39
/************************************************************************/
40
/*               GDALVectorGridNearestAlgorithmStandalone               */
41
/************************************************************************/
42
43
class GDALVectorGridNearestAlgorithmStandalone final
44
    : public GDALVectorGridNearestAlgorithm
45
{
46
  public:
47
    GDALVectorGridNearestAlgorithmStandalone()
48
0
        : GDALVectorGridNearestAlgorithm(/* standaloneStep = */ true)
49
0
    {
50
0
    }
51
52
    ~GDALVectorGridNearestAlgorithmStandalone() override;
53
};
54
55
//! @endcond
56
57
#endif