[osgeo4w-dev] Fwd: Unable to read data correctly in gdal python

Lucia Leon leoneslucia at gmail.com
Fri Apr 24 08:07:15 PDT 2015

Dear all:

I tried it with every kind of gdal binaries available: from Christoph
Gohlke, from Tamas Szekeres, and from Osgeo4w.

But all the gdal binaries report wrong dimension of the HDF dataset.

What should I do? Is the problem inherent to gdal source code?

Any of yours idea is appreciated.



---------- Forwarded message ----------
From: Lucia Leon <leoneslucia at gmail.com>
Date: Thu, Apr 23, 2015 at 8:52 PM
Subject: Unable to read data correctly in gdal python
To: gdal-dev at lists.osgeo.org


The gdalinfo.exe correctly shows the subdataset of a HDF4 file with
dimension [180x8x32x9].  But the same subdataset read from gdal in python
is only  [180x8x32].

I was using the gdal binary from Christoph Gohlke in windows, and according
to  him, the GDAL binaries are built with HDF-4.2.10:


The HDF4 file I was using is here:


The code I was using was as follows:

import gdal
from gdalconst import *
data = gdal.Open('HDF4_EOS:EOS_GRID:' + infile +
':RegParamsLnd:ViewZenAng', GA_ReadOnly).ReadAsArray()
print data.shape

I hope some of you can help me.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/osgeo4w-dev/attachments/20150425/76f56fa4/attachment.html>

More information about the osgeo4w-dev mailing list