13#ifndef GDALALG_VECTOR_GRID_DATA_METRICS_INCLUDED
14#define GDALALG_VECTOR_GRID_DATA_METRICS_INCLUDED
16#include "gdalalg_vector_grid.h"
24class GDALVectorGridDataMetricsAbstractAlgorithm
25 :
public GDALVectorGridAbstractAlgorithm
28 static constexpr const char *HELP_URL =
"/programs/gdal_vector_grid.html";
31 GDALVectorGridDataMetricsAbstractAlgorithm(
const std::string &name,
32 const std::string &description,
33 const std::string &helpURL,
34 const std::string &method,
37 ~GDALVectorGridDataMetricsAbstractAlgorithm()
override;
39 std::string GetGridAlgorithm()
const override;
42 std::string m_method{};
49class GDALVectorGridMinimumAlgorithm
50 :
public GDALVectorGridDataMetricsAbstractAlgorithm
53 static constexpr const char *NAME =
"minimum";
54 static constexpr const char *DESCRIPTION =
55 "Create a regular grid from scattered points using the minimum value "
56 "in the search ellipse.";
58 explicit GDALVectorGridMinimumAlgorithm(
bool standaloneStep =
false)
59 : GDALVectorGridDataMetricsAbstractAlgorithm(
60 NAME, DESCRIPTION, HELP_URL,
"minimum", standaloneStep)
64 ~GDALVectorGridMinimumAlgorithm()
override;
71class GDALVectorGridMinimumAlgorithmStandalone final
72 :
public GDALVectorGridMinimumAlgorithm
75 GDALVectorGridMinimumAlgorithmStandalone()
76 : GDALVectorGridMinimumAlgorithm( true)
80 ~GDALVectorGridMinimumAlgorithmStandalone()
override;
87class GDALVectorGridMaximumAlgorithm
88 :
public GDALVectorGridDataMetricsAbstractAlgorithm
91 static constexpr const char *NAME =
"maximum";
92 static constexpr const char *DESCRIPTION =
93 "Create a regular grid from scattered points using the maximum value "
94 "in the search ellipse.";
96 explicit GDALVectorGridMaximumAlgorithm(
bool standaloneStep =
false)
97 : GDALVectorGridDataMetricsAbstractAlgorithm(
98 NAME, DESCRIPTION, HELP_URL,
"maximum", standaloneStep)
102 ~GDALVectorGridMaximumAlgorithm()
override;
109class GDALVectorGridMaximumAlgorithmStandalone final
110 :
public GDALVectorGridMaximumAlgorithm
113 GDALVectorGridMaximumAlgorithmStandalone()
114 : GDALVectorGridMaximumAlgorithm( true)
118 ~GDALVectorGridMaximumAlgorithmStandalone()
override;
125class GDALVectorGridRangeAlgorithm
126 :
public GDALVectorGridDataMetricsAbstractAlgorithm
129 static constexpr const char *NAME =
"range";
130 static constexpr const char *DESCRIPTION =
131 "Create a regular grid from scattered points using the difference "
132 "between the minimum and maximum values in the search ellipse.";
134 explicit GDALVectorGridRangeAlgorithm(
bool standaloneStep =
false)
135 : GDALVectorGridDataMetricsAbstractAlgorithm(
136 NAME, DESCRIPTION, HELP_URL,
"range", standaloneStep)
140 ~GDALVectorGridRangeAlgorithm()
override;
147class GDALVectorGridRangeAlgorithmStandalone final
148 :
public GDALVectorGridRangeAlgorithm
151 GDALVectorGridRangeAlgorithmStandalone()
152 : GDALVectorGridRangeAlgorithm( true)
156 ~GDALVectorGridRangeAlgorithmStandalone()
override;
163class GDALVectorGridCountAlgorithm
164 :
public GDALVectorGridDataMetricsAbstractAlgorithm
167 static constexpr const char *NAME =
"count";
168 static constexpr const char *DESCRIPTION =
169 "Create a regular grid from scattered points using the number of "
170 "points in the search ellipse.";
172 explicit GDALVectorGridCountAlgorithm(
bool standaloneStep =
false)
173 : GDALVectorGridDataMetricsAbstractAlgorithm(
174 NAME, DESCRIPTION, HELP_URL,
"count", standaloneStep)
178 ~GDALVectorGridCountAlgorithm()
override;
185class GDALVectorGridCountAlgorithmStandalone final
186 :
public GDALVectorGridCountAlgorithm
189 GDALVectorGridCountAlgorithmStandalone()
190 : GDALVectorGridCountAlgorithm( true)
194 ~GDALVectorGridCountAlgorithmStandalone()
override;
201class GDALVectorGridAverageDistanceAlgorithm
202 :
public GDALVectorGridDataMetricsAbstractAlgorithm
205 static constexpr const char *NAME =
"average-distance";
206 static constexpr const char *DESCRIPTION =
207 "Create a regular grid from scattered points using the average "
208 "distance between the grid node (center of the search ellipse) and all "
209 "of the data points in the search ellipse.";
211 explicit GDALVectorGridAverageDistanceAlgorithm(
bool standaloneStep =
false)
212 : GDALVectorGridDataMetricsAbstractAlgorithm(
213 NAME, DESCRIPTION, HELP_URL,
"average_distance", standaloneStep)
217 ~GDALVectorGridAverageDistanceAlgorithm()
override;
224class GDALVectorGridAverageDistanceAlgorithmStandalone final
225 :
public GDALVectorGridAverageDistanceAlgorithm
228 GDALVectorGridAverageDistanceAlgorithmStandalone()
229 : GDALVectorGridAverageDistanceAlgorithm( true)
233 ~GDALVectorGridAverageDistanceAlgorithmStandalone()
override;
240class GDALVectorGridAverageDistancePointsAlgorithm
241 :
public GDALVectorGridDataMetricsAbstractAlgorithm
244 static constexpr const char *NAME =
"average-distance-points";
245 static constexpr const char *DESCRIPTION =
246 "Create a regular grid from scattered points using the average "
247 "distance between the data points in the search ellipse.";
249 explicit GDALVectorGridAverageDistancePointsAlgorithm(
250 bool standaloneStep =
false)
251 : GDALVectorGridDataMetricsAbstractAlgorithm(
252 NAME, DESCRIPTION, HELP_URL,
"average_distance_pts",
257 ~GDALVectorGridAverageDistancePointsAlgorithm()
override;
264class GDALVectorGridAverageDistancePointsAlgorithmStandalone final
265 :
public GDALVectorGridAverageDistancePointsAlgorithm
268 GDALVectorGridAverageDistancePointsAlgorithmStandalone()
269 : GDALVectorGridAverageDistancePointsAlgorithm(
274 ~GDALVectorGridAverageDistancePointsAlgorithmStandalone()
override;