Opened 17 years ago
Last modified 5 years ago
#1900 closed defect
Get hdf band, inverse data set dimensions — at Version 1
Reported by: | cermak | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | closed_because_of_github_migration |
Component: | GDAL_Raster | Version: | unspecified |
Severity: | normal | Keywords: | hdf4 |
Cc: | ilucena, dnadeau, dron |
Description (last modified by )
Hi!
In the MODIS cloud product hdf files (MOD03, MYD03) some data sets are stored with the band dimension last instead of first.
gdalinfo myfile.hdf (or gdal.Dataset.GetSubDatasets) yields: [snip] SUBDATASET_52_NAME=HDF4_EOS:EOS_SWATH:'myfile.hdf':mod06:Cloud_Mask_1km SUBDATASET_52_DESC=[2040x1354x2] Cloud_Mask_1km mod06 (8-bit integer) [snip]
So obviously there are two bands of size 2040x1354 in the subdataset. However, in order for gdal to recognize them as two bands the dimensions would have to be [2x2040x1354].
Accordingly, when I do gdalinfo HDF4_EOS:EOS_SWATH:'myfile.hdf':mod06:Cloud_Mask_1km I get information on 2040 different bands, each of size 1354x2
It would be useful to have a feature in gdal that allows explicit selection of the dimension that holds the band count or even let gdal decide on this.
A sample file is at: ftp://ladsweb.nascom.nasa.gov/allData/5/MYD06_L2/2006/220/MYD06_L2.A2006220.1315.005.2006222153137.hdf
Thanks and all best, Jan
PS: hdfview can read these files.
Change History (1)
comment:1 by , 17 years ago
Cc: | added |
---|---|
Component: | default → GDAL_Raster |
Description: | modified (diff) |
Keywords: | hdf4 added |
Status: | new → assigned |
Added a few people knowledgable about HDF4 to cc list.