<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"DejaVu Sans Mono";
panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.Shkpostityyli18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 2.0cm 70.85pt 2.0cm;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FI" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Have you checked with gdalinfo if you have managed to build the HDF4 driver?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">gdalinfo --format hdf4<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Your test file opens for me with GDAL from OSGeo4W.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">-Jukka Rahkonen-<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b>Lähettäjä:</b> gdal-dev <gdal-dev-bounces@lists.osgeo.org>
<b>Puolesta </b>Hernán De Angelis via gdal-dev<br>
<b>Lähetetty:</b> maanantai 11. marraskuuta 2024 13.37<br>
<b>Vastaanottaja:</b> gdal-dev@lists.osgeo.org<br>
<b>Aihe:</b> [gdal-dev] GDAL, HDF4 and MODIS L1B data<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"DejaVu Sans Mono",serif">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.<br>
<br>
Do I understand correctly that MODIS L1B in HDF-EOS format should be readable by GDAL compiled with HDF4 support without additional libraries?<br>
<br>
Thanks for any hint.<br>
<br>
Hernán<br>
<br>
<br>
<br>
Workflow:<br>
<br>
Build HDF4 (4.3.0)<br>
<br>
./configure --prefix=/home/hernan/project --disable-netcdf --disable-fortran --enable-shared --disable-static<br>
make<br>
make install<br>
<br>
<br>
Build GDAL (3.10) with HDF4 support<br>
ccmake , make, ... etc<br>
<br>
/home/hernan/project/bin/gdal-config --formats<br>
MEM vrt HDF4 MEM<br>
<br>
<br>
<br>
Test<br>
<br>
/home/hernan/project/bin/gdalinfo MOD02QKM.A2024307.1325.061.2024308012941.hdf<br>
ERROR 4: `MOD02QKM.A2024307.1325.061.2024308012941.hdf' not recognized as being in a supported file format.<br>
gdalinfo failed - unable to open 'MOD02QKM.A2024307.1325.061.2024308012941.hdf'.<br>
<br>
<br>
<br>
Testdata if someone wants to try (warning: 150 Mb!):<br>
<a href="https://www.geonatura.se/lastkaj/index.php/s/TCS35pjANsEtSyV">https://www.geonatura.se/lastkaj/index.php/s/TCS35pjANsEtSyV</a></span><o:p></o:p></p>
</div>
</body>
</html>