PostGIS  3.3.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 94 of file rt_util.c.

94  {
95  assert(algname != NULL && strlen(algname) > 0);
96 
97  if (strcmp(algname, "NEARESTNEIGHBOUR") == 0)
98  return GRA_NearestNeighbour;
99  else if (strcmp(algname, "NEARESTNEIGHBOR") == 0)
100  return GRA_NearestNeighbour;
101  else if (strcmp(algname, "BILINEAR") == 0)
102  return GRA_Bilinear;
103  else if (strcmp(algname, "CUBICSPLINE") == 0)
104  return GRA_CubicSpline;
105  else if (strcmp(algname, "CUBIC") == 0)
106  return GRA_Cubic;
107  else if (strcmp(algname, "LANCZOS") == 0)
108  return GRA_Lanczos;
109 
110  return GRA_NearestNeighbour;
111 }

Referenced by RASTER_GDALWarp().

Here is the caller graph for this function: