PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ 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 183 of file rt_util.c.

183 {
184 assert(algname != NULL && strlen(algname) > 0);
185
186 if (strcmp(algname, "NEARESTNEIGHBOUR") == 0)
187 return GRA_NearestNeighbour;
188 else if (strcmp(algname, "NEARESTNEIGHBOR") == 0)
189 return GRA_NearestNeighbour;
190 else if (strcmp(algname, "BILINEAR") == 0)
191 return GRA_Bilinear;
192 else if (strcmp(algname, "CUBICSPLINE") == 0)
193 return GRA_CubicSpline;
194 else if (strcmp(algname, "CUBIC") == 0)
195 return GRA_Cubic;
196 else if (strcmp(algname, "LANCZOS") == 0)
197 return GRA_Lanczos;
198 else if (strcmp(algname, "MAX") == 0)
199 return GRA_Max;
200 else if (strcmp(algname, "MIN") == 0)
201 return GRA_Min;
202 return GRA_NearestNeighbour;
203}

Referenced by RASTER_GDALWarp().

Here is the caller graph for this function: