Hi, I don't manage to get all the info from a GRIB file with a python script as it's possible with gdalinfo output.
gdalinfo output example from a GRIB band: *Band 1 Block=720x1 Type=Float64, ColorInterp=Undefined* * Description = 2[m] HTGL="Specified height level above ground"* * Metadata:* * GRIB_UNIT=[K]* * GRIB_COMMENT=Minimum Temperature [K]* * GRIB_ELEMENT=TMIN* * GRIB_SHORT_NAME=2-HTGL* * GRIB_REF_TIME= 283996800 sec UTC* * GRIB_VALID_TIME= 284000400 sec UTC* * GRIB_FORECAST_SECONDS=0 sec* Till now I manage to get all Metadata tags but not all the info from the tow first lines. I am using the following code: *from osgeo import gdal* * * *dataset = gdal.Open(filename, gdal.GA_ReadOnly)* *if dataset is None:* * print 'Nao foi possivel abrir a imagem!'* *for nBandas in range(1, dataset.RasterCount + 1):* * banda = dataset.GetRasterBand(nBandas)* * BlockSize = banda.GetBlockSize()* * DataType = gdal.GetDataTypeName(banda.DataType)* * Metadata = banda.GetMetadata()* * for chave, valor in Metadata.iteritems():* * print chave, '=', valor.strip()* I would appreciate some help. Thanks in advance. -- Eloi Ribeiro GIS Analyst 39,45º -4,40º http://eloiribeiro.wordpress.com
_______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
