<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>yes, this is sluggish . I just converted a 18002x22000 byte
3-band dataset in 28 minutes.<br>
</p>
<div class="moz-cite-prefix">Le 18/02/2022 à 13:44, Rahkonen Jukka
(MML) a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:f89d609aa62443729bd865779f82d5a4@maanmittauslaitos.fi">
<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;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}span.Shkpostityyli19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}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 lang="EN-US">More information,
probably it does not fail but it is extremely slow. After 15
minutes I am now at this stage<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">gdal_translate -of
HDF4Image 3band.tif out.h4 --debug on<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">GDAL:
GDALOpen(3band.tif, this=00000215A20D36A0) succeeds as
GTiff.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Input file size is
12000, 12000<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">GDAL:
QuietDelete(out.h4) invoking Delete()<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">GDAL: GDALOpen(out.h4,
this=00000215A20BF880) succeeds as HDF4.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">GDALPamDataset: In
destructor with dirty metadata.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">GDAL: GDALClose(out.h4,
this=00000215A20BF880)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">GTiff: ScanDirectories()<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">GDAL:
GDALDefaultOverviews::OverviewScan()<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">GDAL: Using default
GDALDriver::CreateCopy implementation.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">0GDAL:
GDALDriver::Create(HDF4Image,out.h4,12000,12000,3,Byte,0000000000000000)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">GDAL: GDAL_CACHEMAX =
1632 MB<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">GDAL:
GDALDatasetCopyWholeRaster(): 12000*83 swaths, bInterleave=1<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">...10...20...30...40...50...60...70...80...90...100
- done.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">GDAL: Flushing dirty
blocks: 0...10...20...30...40...50...60...70...80...90...100
- done.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">GDAL: Flushing dirty
blocks: 0...10...20...30.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">-Jukka-<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="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><span
style="mso-fareast-language:FI">Lähettäjä:</span></b><span
style="mso-fareast-language:FI"> Rahkonen Jukka (MML)
<br>
<b>Lähetetty:</b> perjantai 18. helmikuuta 2022 14.09<br>
<b>Vastaanottaja:</b> '<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>'
<a class="moz-txt-link-rfc2396E" href="mailto:gdal-dev@lists.osgeo.org"><gdal-dev@lists.osgeo.org></a><br>
<b>Aihe:</b> Gdal_translate into HDF4 fails<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">There is a question
about HDF4 in <a
href="https://gis.stackexchange.com/questions/424204/convert-geotiff-to-hdf-using-gdal"
moz-do-not-send="true" class="moz-txt-link-freetext">
https://gis.stackexchange.com/questions/424204/convert-geotiff-to-hdf-using-gdal</a>.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I tried the same with
GDAL 3.4.0. With a single band image conversion from GeoTIFF
into HDF4Image succeeds but with a 3 band image not. I am
not sure if it is even supposed to work and the driver test
in
<a
href="https://github.com/OSGeo/gdal/blob/master/autotest/gcore/hdf4_write.py"
moz-do-not-send="true" class="moz-txt-link-freetext">
https://github.com/OSGeo/gdal/blob/master/autotest/gcore/hdf4_write.py</a>
is rather simplistic.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">So, should
“gdal_translate -of HDF4Image 3band.tif out3band.h4” work?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">-Jukka Rahkonen-<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>