Returns a set of available GDAL drivers.
1709 GDALDriverH *drv = NULL;
1715 assert(drv_count != NULL);
1718 count = GDALGetDriverCount();
1723 rterror(
"rt_raster_gdal_drivers: Could not allocate memory for gdaldriver structure");
1727 for (i = 0, j = 0; i <
count; i++) {
1728 drv = GDALGetDriver(i);
1730 #ifdef GDAL_DCAP_RASTER 1733 state = GDALGetMetadataItem(drv, GDAL_DCAP_RASTER, NULL);
1734 if (state == NULL || !EQUAL(state,
"YES"))
1740 state = GDALGetMetadataItem(drv, GDAL_DCAP_CREATECOPY, NULL);
1741 if (state == NULL)
continue;
1744 state = GDALGetMetadataItem(drv, GDAL_DCAP_VIRTUALIO, NULL);
1745 if (state == NULL)
continue;
1752 txt = GDALGetDriverShortName(drv);
1753 txt_len = strlen(txt);
1756 RASTER_DEBUGF(3,
"driver %s (%d) supports CreateCopy() and VirtualIO()", txt, i);
1759 txt_len = (txt_len + 1) *
sizeof(
char);
1761 memcpy(rtn[j].short_name, txt, txt_len);
1764 txt = GDALGetDriverLongName(drv);
1765 txt_len = strlen(txt);
1767 txt_len = (txt_len + 1) *
sizeof(
char);
1769 memcpy(rtn[j].long_name, txt, txt_len);
1772 txt = GDALGetDriverCreationOptionList(drv);
1773 txt_len = strlen(txt);
1775 txt_len = (txt_len + 1) *
sizeof(
char);
1777 memcpy(rtn[j].create_options, txt, txt_len);
int rt_util_gdal_register_all(int force_register_all)
struct rt_gdaldriver_t * rt_gdaldriver
void rterror(const char *fmt,...)
Wrappers used for reporting errors and info.
void * rtalloc(size_t size)
Wrappers used for managing memory.
void * rtrealloc(void *mem, size_t size)
#define RASTER_DEBUGF(level, msg,...)