public static List <string> GetSupportRasterExtensions()
        {
            int           driverCount = Gdal.GetDriverCount();
            List <string> extensions  = new List <string>();

            for (int i = 0; i < driverCount; i++)
            {
                using (OSGeo.GDAL.Driver driver = Gdal.GetDriver(i))
                {
                    string[] metadata = driver.GetMetadata("");
                    var      str      = metadata.FirstOrDefault(x => x.Contains("DMD_EXTENSION="));
                    if (str != null)
                    {
                        var  extension = str.Split('=')[1];
                        bool isRaster  = metadata.Any(x => x == "DCAP_RASTER=YES");
                        extension = $".{extension}";
                        if (!extensions.Contains(extension))
                        {
                            extensions.Add(extension);
                        }
                    }
                }
            }
            return(extensions);
        }
 public static void PrintMetadata(Driver driver,
                                  string prefix)
 {
     string[] metadata = driver.GetMetadata("");
     foreach (string metadataItem in metadata)
         Console.WriteLine("{0}{1}", prefix, metadataItem);
 }