Opened 12 years ago
Closed 5 years ago
#4403 closed defect (wontfix)
Compact layers in HDF4 files break gdal_translate
Reported by: | simonf | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | closed_because_of_github_migration |
Component: | default | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
Compact layers are occasionally present in the HDF4 MODIS files produced by LPDAAC. See section 4.2 on page 34 in http://modis-sr.ltdri.org/products/MOD09_UserGuide_v1_3.pdf:
Compact data is written to one-dimensional SDSs in observation order; that is, all the additional observations for row 0, column 0 are written, then all additional observations for row 0, column 1, and so on. If a pixel has no additional observations, nothing is written to the compact SDS for that pixel. The number of additional observations written to the compact data at each pixel is stored in the 2-dimensional SDS 'num_observations'.
As explained by LPDAAC staff: "Most MOD09GA have 21 layers. These have 42 layers inside the HDF files. They are named the same as the original 21 only each has a -c at the end. These stand for compact, and the data in these files are data from additional passes."
Example: ftp://e4ftl01.cr.usgs.gov/MOLT/MOD09GQ.005/2010.12.07/MOD09GQ.A2010341.h10v04.005.2010343114635.hdf
Running this: gdal_translate HDF4_EOS:EOS_GRID:"/tmp/MOD09GQ.A2011342.h22v09.005.2011344054617.hdf":MODIS_Grid_2D:sur_refl_b02_1 /tmp/a
produces: Input file size is 4800, 4800 0ERROR 1: GDreadfield() failed for block. ERROR 1: IReadBlock failed at X offset 0, Y offset 320 ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 320
This is still a problem with 1.8.1
Change History (1)
comment:1 by , 5 years ago
Milestone: | → closed_because_of_github_migration |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.