Thanks!
The following works:
r <-
raster("HDF4_EOS:EOS_GRID:/media/Iomega_HDD/VOLCAN/Modis_adls_MOD09A1/MOD09A1.A2011289.h11v11.005.2011298101214.hdf:MOD_Grid_500m_Surface_Reflectance:sur_refl_b01")
And much beter, the following works as well:
modislista <-
getSds(file.path(modisdir,"MOD09A1.A20
Yes, no problem from that side. I've used
gdal_translate -sds
and get all subdatasets saved as individual tif layers.
But we should know what's wrong with the hdf flle as there are many
thousands of files like this on the
modis distribution data servers.
Agus
On Tue, Oct 8, 2013 at 1:58 PM, José
Section 'Subdatasets'ie:
SUBDATASET_1_NAME=HDF4_EOS:EOS_GRID:"MOD09A1.A2011289.h11v11.005.2011298101214.hdf":MOD_Grid_500m_Surface_Reflectance:sur_refl_b01
# this should work if R is in the HDF directory! if not redo gdalinfo with the
file absolute path: gdalinfo
/path/to/MOD09A1.A2011289.h11v
Have you tried converting the layer(s) of interest to something like ".tif"
by using gdal_translate?
2013/10/8 Agustin Lobo
> Here it goes, thaks a lot for your help:
>
> $ gdalinfo MOD09A1.A2011289.h11v11.005.2011298101214.hdf
> Driver: HDF4/Hierarchical Data Format Release 4
> Files: MOD09A1.
Here it goes, thaks a lot for your help:
$ gdalinfo MOD09A1.A2011289.h11v11.005.2011298101214.hdf
Driver: HDF4/Hierarchical Data Format Release 4
Files: MOD09A1.A2011289.h11v11.005.2011298101214.hdf
Size is 512, 512
Coordinate System is `'
Metadata:
ASSOCIATEDINSTRUMENTSHORTNAME=MODIS
ASSOCIAT
Dear Agus,
yes please send the output of gdalinfo (close to the end is the string you have
to use).
Matteo
>>> Agustin Lobo 10/07/13 5:42 PM >>>
Hi!
I get the following error when try to read an hdf image (release 4):
> modisima <-
> stack(file.path(modisdir,"MOD09A1.A2011289.h11v11.0
Hi!
I get the following error when try to read an hdf image (release 4):
> modisima <-
> stack(file.path(modisdir,"MOD09A1.A2011289.h11v11.005.2011298101214.hdf"))
rgdal: version: 0.8-11, (SVN revision 479M)
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runt