Skip to main content
4 of 9
added 35 characters in body
ThomasG77
  • 31.2k
  • 1
  • 55
  • 95

A one liner to get all drivers (GDAL + OGR)

python -c "from osgeo import gdal;print('\n'.join(sorted([gdal.GetDriver(i).GetDescription() for i in range(gdal.GetDriverCount())])))"

You can also filter drivers to get only GDAL one using the following

from osgeo import gdal 

all_driver_names = [gdal.GetDriver(i).GetDescription() for i in range(gdal.GetDriverCount())] 
gdal_driver_names = [
    ' - '.join([
        driver_name,
        gdal.GetDriverByName(driver_name).LongName
    ]) for driver_name in all_driver_names
    if gdal.GetDriverByName(driver_name).GetMetadataItem('DCAP_RASTER') == 'YES']

print('\n'.join(gdal_driver_names))
ThomasG77
  • 31.2k
  • 1
  • 55
  • 95