-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgdalresample.cpp
43 lines (40 loc) · 1.11 KB
/
gdalresample.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include "infra/gdalresample.h"
namespace inf::gdal {
std::string resample_algo_to_string(ResampleAlgorithm algo)
{
switch (algo) {
case ResampleAlgorithm::NearestNeighbour:
return "NEAREST";
case ResampleAlgorithm::Bilinear:
return "BILINEAR";
case ResampleAlgorithm::Cubic:
return "CUBIC";
case ResampleAlgorithm::CubicSpline:
return "CUBICSPLINE";
case ResampleAlgorithm::Lanczos:
return "LANCZOS";
case ResampleAlgorithm::Average:
return "AVERAGE";
case ResampleAlgorithm::Mode:
return "MODE";
case ResampleAlgorithm::Maximum:
return "MAXIMUM";
case ResampleAlgorithm::Minimum:
return "MINIMUM";
case ResampleAlgorithm::Median:
return "MEDIAN";
case ResampleAlgorithm::FirstQuantile:
return "FIRSTQUANTILE";
case ResampleAlgorithm::ThirdQuantile:
return "THIRDQUANTILE";
#if GDAL_VERSION_NUM >= 3010000
case ResampleAlgorithm::Sum:
return "SUM";
case ResampleAlgorithm::RootMeanSquare:
return "RMS";
#endif
default:
return "NONE";
}
}
}