PostGIS  2.1.10dev-r@@SVN_REVISION@@
Datum RASTER_gdal_version ( PG_FUNCTION_ARGS  )

Definition at line 1043 of file rt_pg.c.

References result, rt_util_gdal_configured(), and rt_util_gdal_version().

1044 {
1045  const char *ver = rt_util_gdal_version("--version");
1046  text *result;
1047 
1048  /* add indicator if GDAL isn't configured right */
1049  if (!rt_util_gdal_configured()) {
1050  char *rtn = NULL;
1051  rtn = palloc(strlen(ver) + strlen(" GDAL_DATA not found") + 1);
1052  if (!rtn)
1053  result = cstring2text(ver);
1054  else {
1055  sprintf(rtn, "%s GDAL_DATA not found", ver);
1056  result = cstring2text(rtn);
1057  pfree(rtn);
1058  }
1059  }
1060  else
1061  result = cstring2text(ver);
1062 
1063  PG_RETURN_POINTER(result);
1064 }
int rt_util_gdal_configured(void)
Definition: rt_api.c:424
char ** result
Definition: liblwgeom.h:218
const char * rt_util_gdal_version(const char *request)
Definition: rt_api.c:291

Here is the call graph for this function: