MCPcopy Create free account
hub / github.com/OSGeo/gdal / GDALRasterIOGetResampleAlg

Function GDALRasterIOGetResampleAlg

gcore/gdal_misc.cpp:5062–5087  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5060/************************************************************************/
5061
5062GDALRIOResampleAlg 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() */

Callers 15

MAIN_STARTFunction · 0.85
GenerateOverviewTileFunction · 0.85
RunStepMethod · 0.85
RasterIOResampledMethod · 0.85
IRasterIOMethod · 0.85
XMLInitMethod · 0.85
SerializeToXMLMethod · 0.85
RasterIOMethod · 0.85
DatasetRasterIOMethod · 0.85

Calls 2

CPLErrorFunction · 0.85
EQUALFunction · 0.50

Tested by

no test coverage detected