PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ RASTER_gdal_version()

Datum RASTER_gdal_version ( PG_FUNCTION_ARGS  )

Definition at line 69 of file rtpg_utility.c.

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

References rt_util_gdal_configured(), and rt_util_gdal_version().

Here is the call graph for this function: