[gdal-dev] Checking if a label exists in a HDF file
Anton Korosov
anton.korosov at nersc.no
Fri Aug 5 04:08:09 EDT 2011
Hi Antonio!
In python you'll probably have to open the dataset, loop through all
bands, fetch description (or metadata) from each band and then decide if
the required band exists.
f =
gdal.Open('HDF4_EOS:EOS_SWATH:"MOD021KM.A2010105.2120.005.2010106075131.hdf":MODIS_SWATH_Type_L1B:EV_1KM_RefSB')
b = f.GetRasterBand(1)
b.GetDescription()
print b
...
'Earth View 1KM Reflective Solar Bands Scaled Integers'
On 08/05/2011 09:33 AM, António Rocha wrote:
> Hi Anton
> Thanks for the feedbvack. Unfortunely I'm not much familiar with bash
> Script. I'm running this in Python (without Gdalpy). Is there a way for
> Python?
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 6351 (20110804) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
More information about the gdal-dev
mailing list