PostGIS 3.0.6dev-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 93 of file rt_util.c.

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

Referenced by RASTER_GDALWarp().

Here is the caller graph for this function: