| 5060 | /************************************************************************/ |
| 5061 | |
| 5062 | GDALRIOResampleAlg GDALRasterIOGetResampleAlg(const char *pszResampling) |
| 5063 | { |
| 5064 | GDALRIOResampleAlg eResampleAlg = GRIORA_NearestNeighbour; |
| 5065 | if (STARTS_WITH_CI(pszResampling, "NEAR")) |
| 5066 | eResampleAlg = GRIORA_NearestNeighbour; |
| 5067 | else if (EQUAL(pszResampling, "BILINEAR")) |
| 5068 | eResampleAlg = GRIORA_Bilinear; |
| 5069 | else if (EQUAL(pszResampling, "CUBIC")) |
| 5070 | eResampleAlg = GRIORA_Cubic; |
| 5071 | else if (EQUAL(pszResampling, "CUBICSPLINE")) |
| 5072 | eResampleAlg = GRIORA_CubicSpline; |
| 5073 | else if (EQUAL(pszResampling, "LANCZOS")) |
| 5074 | eResampleAlg = GRIORA_Lanczos; |
| 5075 | else if (EQUAL(pszResampling, "AVERAGE")) |
| 5076 | eResampleAlg = GRIORA_Average; |
| 5077 | else if (EQUAL(pszResampling, "RMS")) |
| 5078 | eResampleAlg = GRIORA_RMS; |
| 5079 | else if (EQUAL(pszResampling, "MODE")) |
| 5080 | eResampleAlg = GRIORA_Mode; |
| 5081 | else if (EQUAL(pszResampling, "GAUSS")) |
| 5082 | eResampleAlg = GRIORA_Gauss; |
| 5083 | else |
| 5084 | CPLError(CE_Warning, CPLE_NotSupported, |
| 5085 | "GDAL_RASTERIO_RESAMPLING = %s not supported", pszResampling); |
| 5086 | return eResampleAlg; |
| 5087 | } |
| 5088 | |
| 5089 | /************************************************************************/ |
| 5090 | /* GDALRasterIOGetResampleAlgStr() */ |
no test coverage detected