Hi there, I have some trouble reading from some particular MODIS files giving me the following error message:
ERROR 1: GDreadfield() failed for block. ERROR 1: HDF4_EOS:EOS_GRID:"/mnt/MODIS/MOD10/2014/MOD10A1.A2014139.h18v04.005.2014141065636.hdf":MOD_Grid_Snow_500m:Snow_Cover_Daily_Tile, band 1: IReadBlock failed at X offset 0, Y offset 0 ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 0 The reading in my case only fails for MOD10 products, MOD09 products work fine. This error occurs both when using gdal distributed tools like gdal_translate or when writing my own code reading a rasterband via the RasterIO method. The general dataset access works fine, for extracting metadata and retrieving geocoding etc. I found that a similar issue was reported back in 2009 but I couldn't find any solution that works for me. I have, as suggested in the old threads, compiled GDAL from scratch including many of the external libraries. I have used the following libraries and compiled all of them on my CENTOS 7 64bit installation using configure and gmake: szip-2.1.tar.gz zlib-1.2.8.tar.gz tiff-4.0.4.tar.gz jpegsrc.v9a.tar.gz proj.4-master.zip hdf4.2.11.tar.gz hdf5-1.8.15-patch1.tar.gz netcdf-c-4.3.3.1.tar.gz gdal-2.0.0.tar.gz szip -> ./configure --prefix=/usr/local zlib -> ./configure tiff -> ./configure jpeg -> ./configure proj4 -> ./configure hdf4 -> ./configure --prefix=/usr/local --with-szlib=/usr/local/lib--with-jpeg=/usr/local/lib --enable-shared=yes --disable-fortran --disable-netcdf hdf5 -> ./configure --prefix=/usr/local netcdf -> ./configure gdal -> ./configure For each library in the order presented here I then executed gmake install. This finished without error messages. When looking in the summary of the gdal build I can see that all libraries are found correctly. I ran a test on my windows x64 machine, where I also have compiled gdal2.0.0 x64 . There I can read the raster band without problem when running e.g.: gdal_translate -of GTiFF HDF4_EOS:EOS_GRID:"M:\MOD10\2014\MOD10A1.A2014001.h18v04.005.2014003062628.hdf":MOD_Grid_Snow_500m:Snow_Cover_Daily_Tile output=test.tif The same command however fails on my linux machine. Any help in this matter would be greatly appreciated. Thanks and kind regards, Alex
_______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
