[gdal-dev] gdalinfo: fix metadata output

Christian Authmann authmanc at Mathematik.Uni-Marburg.de
Thu Jun 26 04:19:55 PDT 2014


Hi,

yes, I'm talking about metadata in a custom domain. I hacked up a driver 
to return additional metadata I want to use; since that metadata is 
driver specific I put it into a custom domain named after the driver.

If you guessed MSG driver you'd be correct; but the SVN version doesn't 
return any metadata as the moment. I'll eventually send another patch 
for adding said metadata, but it'll be a while until I figured out what 
data is available and useful.

I've clarified the description and created two tickets per your request:

http://trac.osgeo.org/gdal/ticket/5541
http://trac.osgeo.org/gdal/ticket/5542

Ciao,
Christian

On 26.06.2014 13:02, Even Rouault wrote:
> Christian,
>
> I guess you are talking about metadata in domains other than the default and
> IMAGE_STRUCTURE metadata domains ?
> With which driver did you experiment that issue ?
>
> Would you mind attaching your patch as an attachment to a ticket in Trac (
> http://trac.osgeo.org/gdal/newticket ) ? For that issue, and for your other
> email as well.
>
> Best regards,
>
> Even
>
>> Hello,
>>
>> I tried getting a driver to return some useful metadata from the files,
>> but gdalinfo never displayed any of it. As it turns out, the culprit was
>> gdalinfo. It will never report metadata from the bands, even if
>> explicitely requested in the command line.
>>
>> So I set out to rewrite the metadata handling. It will now use the same
>> function to display both dataset metadata and band metadata. While I was
>> at it, I fixed a violation of the DRY-principle, introducing a small
>> helper function to get a metadata list, loop over it and output everything.
>>
>>
>> Since there's probably someone out there with a script that parses the
>> output of gdalinfo, I was careful not to introduce any functional
>> changes in the output. The only visible difference should be that band
>> metadata is actually printed.
>>
>>
>> Patch is attached for review and/or committing.
>>
>>
>> --
>> Christian Authmann
>> Philipps-Universität Marburg
>> Fachbereich Mathematik und Informatik
>> AG Datenbanksysteme
>> Hans-Meerwein-Straße
>> D-35032 Marburg
>>
>

-- 
Christian Authmann
Philipps-Universität Marburg
Fachbereich Mathematik und Informatik
AG Datenbanksysteme
Hans-Meerwein-Straße
D-35032 Marburg


More information about the gdal-dev mailing list