/src/gdal/apps/gdalalg_vector_grid_invdistnn.h
Line | Count | Source |
1 | | /****************************************************************************** |
2 | | * |
3 | | * Project: GDAL |
4 | | * Purpose: gdal "vector grid invdistnn" 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_INVDISTNN_INCLUDED |
14 | | #define GDALALG_VECTOR_GRID_INVDISTNN_INCLUDED |
15 | | |
16 | | #include "gdalalg_vector_grid.h" |
17 | | |
18 | | #include <limits> |
19 | | |
20 | | //! @cond Doxygen_Suppress |
21 | | |
22 | | /************************************************************************/ |
23 | | /* GDALVectorGridInvdistNNAlgorithm */ |
24 | | /************************************************************************/ |
25 | | |
26 | | class GDALVectorGridInvdistNNAlgorithm /* non final */ |
27 | | : public GDALVectorGridAbstractAlgorithm |
28 | | { |
29 | | public: |
30 | | static constexpr const char *NAME = "invdistnn"; |
31 | | static constexpr const char *DESCRIPTION = |
32 | | "Create a regular grid from scattered points using weighted inverse " |
33 | | "distance interpolation nearest neighbour."; |
34 | | static constexpr const char *HELP_URL = "/programs/gdal_vector_grid.html"; |
35 | | |
36 | | explicit GDALVectorGridInvdistNNAlgorithm(bool standaloneStep = false); |
37 | | |
38 | | std::string GetGridAlgorithm() const override; |
39 | | |
40 | | private: |
41 | | double m_power = 2.0; |
42 | | double m_smoothing = 0.0; |
43 | | }; |
44 | | |
45 | | /************************************************************************/ |
46 | | /* GDALVectorGridInvdistNNAlgorithmStandalone */ |
47 | | /************************************************************************/ |
48 | | |
49 | | class GDALVectorGridInvdistNNAlgorithmStandalone final |
50 | | : public GDALVectorGridInvdistNNAlgorithm |
51 | | { |
52 | | public: |
53 | | GDALVectorGridInvdistNNAlgorithmStandalone() |
54 | 0 | : GDALVectorGridInvdistNNAlgorithm(/* standaloneStep = */ true) |
55 | 0 | { |
56 | 0 | } |
57 | | |
58 | | ~GDALVectorGridInvdistNNAlgorithmStandalone() override; |
59 | | }; |
60 | | |
61 | | //! @endcond |
62 | | |
63 | | #endif |