Re: [gdal-dev] Gdal_translate into HDF4 fails
Cool, i tired and actually works, but just a question, is it normal that using gdal_translate -of netCDF -co FORMAT=NC4 the resulting image is rotated by 180° (Upside down)? Thanks Il giorno ven 18 feb 2022 alle ore 15:39 Even Rouault < even.roua...@spatialys.com> ha scritto: > if you gdal_translate -of netCDF -co FORMAT=NC4 , the resulting netCDF > file will actually be a HDF5 file (with netCDF "decorations"): > > - https://gdal.org/drivers/raster/netcdf.html#creation-options > > - > https://www.unidata.ucar.edu/software/netcdf/docs/interoperability_hdf5.html > Le 18/02/2022 à 15:24, Lorenzo Di Giacomo a écrit : > > Hi guys, i was reading the question and i was wondering if it's possibile > do the same translate operation with HDF5, like: > gdal_translate -of HDF5Image 3band.tif out.h5, i tried but doesn't work > and says " > > HDF5 driver has no creation capabilities." > > Thanks > > -- http://www.spatialys.com > My software is free, but my time generally not. > > ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Gdal_translate into HDF4 fails
if you gdal_translate -of netCDF -co FORMAT=NC4 , the resulting netCDF file will actually be a HDF5 file (with netCDF "decorations"): - https://gdal.org/drivers/raster/netcdf.html#creation-options - https://www.unidata.ucar.edu/software/netcdf/docs/interoperability_hdf5.html Le 18/02/2022 à 15:24, Lorenzo Di Giacomo a écrit : Hi guys, i was reading the question and i was wondering if it's possibile do the same translate operation with HDF5, like: gdal_translate -of HDF5Image 3band.tif out.h5, i tried but doesn't work and says " HDF5 driver has no creation capabilities." Thanks -- http://www.spatialys.com My software is free, but my time generally not. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Gdal_translate into HDF4 fails
Hi, That HDF5 driver is read-only is documented in https://gdal.org/drivers/raster/hdf5.html so that the driver capabilities are missing Supports CreateCopy() and Supports Create() Same metadata is available with gdalinfo --format [format_name]. (But metadata is wrong for HDF4 and capabilities are missing, I wonder how to fix that) gdalinfo --format hdf4 Format Details: Short Name: HDF4 Long Name: Hierarchical Data Format Release 4 Supports: Raster Supports: Multidimensional raster Extension: hdf Help Topic: drivers/raster/hdf4.html Supports: Raster subdatasets Supports: Open() - Open existing dataset. -Jukka Rahkonen- Lähettäjä: Lorenzo Di Giacomo Lähetetty: perjantai 18. helmikuuta 2022 16.24 Vastaanottaja: Even Rouault Kopio: Rahkonen Jukka (MML) ; 'gdal-dev@lists.osgeo.org' (gdal-dev@lists.osgeo.org) Aihe: Re: [gdal-dev] Gdal_translate into HDF4 fails Hi guys, i was reading the question and i was wondering if it's possibile do the same translate operation with HDF5, like: gdal_translate -of HDF5Image 3band.tif out.h5, i tried but doesn't work and says " HDF5 driver has no creation capabilities." Thanks ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Gdal_translate into HDF4 fails
Hi guys, i was reading the question and i was wondering if it's possibile do the same translate operation with HDF5, like: gdal_translate -of HDF5Image 3band.tif out.h5, i tried but doesn't work and says " HDF5 driver has no creation capabilities." Thanks ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Gdal_translate into HDF4 fails
yes, this is sluggish . I just converted a 18002x22000 byte 3-band dataset in 28 minutes. Le 18/02/2022 à 13:44, Rahkonen Jukka (MML) a écrit : 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=0215A20D36A0) succeeds as GTiff. Input file size is 12000, 12000 GDAL: QuietDelete(out.h4) invoking Delete() GDAL: GDALOpen(out.h4, this=0215A20BF880) succeeds as HDF4. GDALPamDataset: In destructor with dirty metadata. GDAL: GDALClose(out.h4, this=0215A20BF880) GTiff: ScanDirectories() GDAL: GDALDefaultOverviews::OverviewScan() GDAL: Using default GDALDriver::CreateCopy implementation. 0GDAL: GDALDriver::Create(HDF4Image,out.h4,12000,12000,3,Byte,) 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@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- ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev -- http://www.spatialys.com My software is free, but my time generally not. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Gdal_translate into HDF4 fails
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=0215A20D36A0) succeeds as GTiff. Input file size is 12000, 12000 GDAL: QuietDelete(out.h4) invoking Delete() GDAL: GDALOpen(out.h4, this=0215A20BF880) succeeds as HDF4. GDALPamDataset: In destructor with dirty metadata. GDAL: GDALClose(out.h4, this=0215A20BF880) GTiff: ScanDirectories() GDAL: GDALDefaultOverviews::OverviewScan() GDAL: Using default GDALDriver::CreateCopy implementation. 0GDAL: GDALDriver::Create(HDF4Image,out.h4,12000,12000,3,Byte,) 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@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- ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] 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- ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev