PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ rt_util_gdal_resample_alg()

GDALResampleAlg rt_util_gdal_resample_alg ( const char *  algname)

Convert cstring name to GDAL Resample Algorithm.

Parameters
algname: cstring name to convert
Returns
valid GDAL resampling algorithm

Definition at line 91 of file rt_util.c.

Referenced by RASTER_GDALWarp().

91  {
92  assert(algname != NULL && strlen(algname) > 0);
93 
94  if (strcmp(algname, "NEARESTNEIGHBOUR") == 0)
95  return GRA_NearestNeighbour;
96  else if (strcmp(algname, "NEARESTNEIGHBOR") == 0)
97  return GRA_NearestNeighbour;
98  else if (strcmp(algname, "BILINEAR") == 0)
99  return GRA_Bilinear;
100  else if (strcmp(algname, "CUBICSPLINE") == 0)
101  return GRA_CubicSpline;
102  else if (strcmp(algname, "CUBIC") == 0)
103  return GRA_Cubic;
104  else if (strcmp(algname, "LANCZOS") == 0)
105  return GRA_Lanczos;
106 
107  return GRA_NearestNeighbour;
108 }
Here is the caller graph for this function: