<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <font size="2" face="DejaVu Sans Mono">Thank you for your response,
      Jukka.</font><br>
    <br>
    <font size="2" face="DejaVu Sans Mono">That is interesting. I set
      cmake to build hdf4, cmake sees it and it does not throw errors
      during the build. In fact, I see:</font><br>
    <br>
    <font size="2" face="DejaVu Sans Mono">[ 38%] Built target gdal_HDF4</font><br>
    <br>
    <font size="2" face="DejaVu Sans Mono">but the command you gave
      gives not HDF4</font><br>
    <br>
    <font face="DejaVu Sans Mono"><span lang="EN-US"
        style="mso-fareast-language:EN-US">gdalinfo --format hdf4</span></font><br>
    <font face="DejaVu Sans Mono"><span lang="EN-US"
        style="mso-fareast-language:EN-US"></span></font><br>
    <font face="DejaVu Sans Mono"><span lang="EN-US"
        style="mso-fareast-language:EN-US">(should be "formats"
        instead?)</span></font><br>
    <font face="DejaVu Sans Mono"><span lang="EN-US"
        style="mso-fareast-language:EN-US"></span></font><font
      face="DejaVu Sans Mono"><span lang="EN-US"
        style="mso-fareast-language:EN-US">gdalinfo --formats hdf4<br>
        <br>
        this retrieves a long list, but no HDF5:<br>
        <br>
        gdalinfo --formats | grep hdf<br>
          HDF5 -raster,multidimensional raster- (rovs): Hierarchical
        Data Format Release 5 (*.h5, *.hdf5)<br>
        <br>
        on the other hand </span></font><br>
    <font face="DejaVu Sans Mono"><font size="2">gdal-config --formats<br>
        <br>
        gives:<br>
        <br>
        gdal-config --formats<br>
        MEM vrt HDF4 MEM<br>
        <br>
        So it should be there?<br>
        <br>
        This is confusing. Will keep looking.<br>
        <br>
        Thank you for your time, Jukka!<br>
        <br>
        Hernán<br>
      </font></font><br>
    <br>
    <div class="moz-cite-prefix">Den 2024-11-11 kl. 12:45, skrev
      Rahkonen Jukka:<br>
    </div>
    <blockquote type="cite"
cite="mid:DB9PR09MB68870E3F27686052DDC76AB3FD582@DB9PR09MB6887.eurprd09.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator"
        content="Microsoft Word 15 (filtered medium)">
      <style>@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;}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;}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]-->
      <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
              <a class="moz-txt-link-rfc2396E" href="mailto:gdal-dev-bounces@lists.osgeo.org"><gdal-dev-bounces@lists.osgeo.org></a>
              <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> <a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><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"
              moz-do-not-send="true" class="moz-txt-link-freetext">https://www.geonatura.se/lastkaj/index.php/s/TCS35pjANsEtSyV</a></span><o:p></o:p></p>
      </div>
    </blockquote>
    <br>
  </body>
</html>