399 char *vsi_options_str =
rtoptions(
"gdal_vsi_options");
402 if (vsi_options_str && strlen(vsi_options_str) > 0) {
405 rtinfo(
"postgis.gdal_vsi_options is set");
406 memset(olist, 0,
sizeof(olist));
411 for (i = 0; i < sz; i += 2)
413 char *key = olist[i];
414 char *val = olist[i+1];
417 if (strcmp(key,
"gdal_skip") == 0) {
418 rtwarn(
"Unable to set GDAL_SKIP config option");
421 rtinfo(
"CPLSetConfigOption(%s)", key);
422 CPLSetConfigOption(key, val);
427 unsigned int open_flags;
432 rterror(
"rt_util_gdal_open: Cannot open file. All GDAL drivers disabled");
439 (strstr(fn,
"/vsi") != NULL) &&
440 (strstr(fn,
"/vsimem") == NULL) &&
448 open_flags = GDAL_OF_RASTER
449 | GDAL_OF_VERBOSE_ERROR
450 | (fn_access == GA_Update ? GDAL_OF_UPDATE : 0)
451 | (shared ? GDAL_OF_SHARED : 0);
453 return GDALOpenEx(fn ,
void rterror(const char *fmt,...) __attribute__((format(printf
Wrappers used for reporting errors and info.
void void void char * rtoptions(const char *varname)
Wrappers used for options.
void void rtinfo(const char *fmt,...) __attribute__((format(printf
void void void rtwarn(const char *fmt,...) __attribute__((format(printf
size_t option_list_length(char **olist)
Returns the total number of keys and values in the list.
void option_list_parse(char *input, char **olist)
option_list is a null-terminated list of strings, where every odd string is a key and every even stri...
char * gdal_enabled_drivers