[gdal-dev] Gdal_translate into HDF4 fails

Rahkonen Jukka (MML) jukka.rahkonen at maanmittauslaitos.fi
Fri Feb 18 04:44:32 PST 2022


More information, probably it does not fail but it is extremely slow. After 15 minutes I am now at this stage

gdal_translate -of HDF4Image 3band.tif out.h4 --debug on
GDAL: GDALOpen(3band.tif, this=00000215A20D36A0) succeeds as GTiff.
Input file size is 12000, 12000
GDAL: QuietDelete(out.h4) invoking Delete()
GDAL: GDALOpen(out.h4, this=00000215A20BF880) succeeds as HDF4.
GDALPamDataset: In destructor with dirty metadata.
GDAL: GDALClose(out.h4, this=00000215A20BF880)
GTiff: ScanDirectories()
GDAL: GDALDefaultOverviews::OverviewScan()
GDAL: Using default GDALDriver::CreateCopy implementation.
0GDAL: GDALDriver::Create(HDF4Image,out.h4,12000,12000,3,Byte,0000000000000000)
GDAL: GDAL_CACHEMAX = 1632 MB
GDAL: GDALDatasetCopyWholeRaster(): 12000*83 swaths, bInterleave=1
...10...20...30...40...50...60...70...80...90...100 - done.
GDAL: Flushing dirty blocks: 0...10...20...30...40...50...60...70...80...90...100 - done.
GDAL: Flushing dirty blocks: 0...10...20...30.


-Jukka-


Lähettäjä: Rahkonen Jukka (MML)
Lähetetty: perjantai 18. helmikuuta 2022 14.09
Vastaanottaja: 'gdal-dev at lists.osgeo.org' <gdal-dev at lists.osgeo.org>
Aihe: Gdal_translate into HDF4 fails

Hi,

There is a question about HDF4 in https://gis.stackexchange.com/questions/424204/convert-geotiff-to-hdf-using-gdal.
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 https://github.com/OSGeo/gdal/blob/master/autotest/gcore/hdf4_write.py is rather simplistic.
So, should "gdal_translate -of HDF4Image 3band.tif out3band.h4" work?

-Jukka Rahkonen-

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220218/741edfcc/attachment.html>


More information about the gdal-dev mailing list