PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ RASTER_gdal_version()

Datum RASTER_gdal_version ( PG_FUNCTION_ARGS  )

Definition at line 72 of file rtpg_utility.c.

73 {
74  const char *ver = rt_util_gdal_version("--version");
75  text *result;
76 
77  /* add indicator if GDAL isn't configured right */
78  if (!rt_util_gdal_configured()) {
79  char *rtn = NULL;
80  size_t sz = strlen(ver) + strlen(" GDAL_DATA not found") + 1;
81  rtn = palloc(sz);
82  if (!rtn)
83  result = cstring_to_text(ver);
84  else {
85  snprintf(rtn, sz, "%s GDAL_DATA not found", ver);
86  result = cstring_to_text(rtn);
87  pfree(rtn);
88  }
89  }
90  else
91  result = cstring_to_text(ver);
92 
93  PG_RETURN_POINTER(result);
94 }
int rt_util_gdal_configured(void)
Definition: rt_util.c:317
const char * rt_util_gdal_version(const char *request)
Definition: rt_util.c:182

References rt_util_gdal_configured(), and rt_util_gdal_version().

Here is the call graph for this function: