[gdal-dev] error parsing metadata from HDF5 dataset

Rashad M mohammedrashadkm at gmail.com
Thu Sep 3 07:58:34 PDT 2015


Hello all,

I have an problem when reading metadata information of HDF5 dataset. some
of the values are not parsed properly by GDAL. Below is the relevant part
of output from gdalinfo


....
  Azimuth_Processing_Number_of_Looks=
  Bits_per_Sample=
....

S01_B001_Azimuth_Ramp_Code=

<garbage values and newline chars>

....
....
 Sample_Format=INT
  Samples_per_Pixel=
  Satellite_Height=628440.5
  Satellite_ID=CSKS3
....


I had looked into frmts/hdf5/hdf5dataset.cpp and all of these metadata are
of type H5T_NATIVE_UCHAR.

https://trac.osgeo.org/gdal/browser/branches/1.11/gdal/frmts/hdf5/hdf5dataset.cpp#L728

changing format specifier from char( %c) to int(%d) solves the issue for
me. But is there a better fix for this?


OS: Fedora 20 x86_64
gdal branch: 1.11

svn info

Path: .
Working Copy Root Path: /home/mkanavat/sources/gdal_branch_1.11
URL: http://svn.osgeo.org/gdal/branches/1.11/gdal
Relative URL: ^/branches/1.11/gdal
Repository Root: http://svn.osgeo.org/gdal
Repository UUID: f0d54148-0727-0410-94bb-9a71ac55c965
Revision: 30007
Node Kind: directory
Schedule: normal
Last Changed Author: rouault
Last Changed Rev: 30005
Last Changed Date: 2015-09-01 10:17:50 +0200 (Tue, 01 Sep 2015)


-- 
Regards,
   Rashad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20150903/1dad5b39/attachment.html>


More information about the gdal-dev mailing list