PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ rt_util_gdal_driver_registered()

int rt_util_gdal_driver_registered ( const char *  drv)

Definition at line 353 of file rt_util.c.

References genraster::count.

Referenced by rt_raster_gdal_rasterize(), rt_raster_gdal_warp(), rt_raster_to_gdal_mem(), and test_util_gdal_open().

353  {
354  int count = GDALGetDriverCount();
355  int i = 0;
356  GDALDriverH hdrv = NULL;
357 
358  if (drv == NULL || !strlen(drv) || count < 1)
359  return 0;
360 
361  for (i = 0; i < count; i++) {
362  hdrv = GDALGetDriver(i);
363  if (hdrv == NULL) continue;
364 
365  if (strcmp(drv, GDALGetDriverShortName(hdrv)) == 0)
366  return 1;
367  }
368 
369  return 0;
370 }
int count
Definition: genraster.py:56
Here is the caller graph for this function: