Hi,

Have you checked with gdalinfo if you have managed to build the HDF4 driver?
gdalinfo --format hdf4

Your test file opens for me with GDAL from OSGeo4W.

-Jukka Rahkonen-

Lähettäjä: gdal-dev <gdal-dev-boun...@lists.osgeo.org> Puolesta Hernán De 
Angelis via gdal-dev
Lähetetty: maanantai 11. marraskuuta 2024 13.37
Vastaanottaja: gdal-dev@lists.osgeo.org
Aihe: [gdal-dev] GDAL, HDF4 and MODIS L1B data

I recently compiled a minimal GDAL (3.10) with HDF4 support (using HDF 4.3.0) 
for processing MODIS L1B data. However, the resulting command line tools cannot 
understand the format. Perhaps I am doing something wrong, or missing something 
important, or both.

Do I understand correctly that MODIS L1B in HDF-EOS format should be readable 
by GDAL compiled with HDF4 support without additional libraries?

Thanks for any hint.

Hernán



Workflow:

Build HDF4 (4.3.0)

./configure --prefix=/home/hernan/project --disable-netcdf --disable-fortran 
--enable-shared --disable-static
make
make install


Build GDAL (3.10) with HDF4 support
ccmake , make, ... etc

/home/hernan/project/bin/gdal-config --formats
MEM vrt HDF4 MEM



Test

/home/hernan/project/bin/gdalinfo MOD02QKM.A2024307.1325.061.2024308012941.hdf
ERROR 4: `MOD02QKM.A2024307.1325.061.2024308012941.hdf' not recognized as being 
in a supported file format.
gdalinfo failed - unable to open 'MOD02QKM.A2024307.1325.061.2024308012941.hdf'.



Testdata if someone wants to try (warning: 150 Mb!):
https://www.geonatura.se/lastkaj/index.php/s/TCS35pjANsEtSyV
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to