#5542 closed enhancement (fixed)
gdalinfo: output band metadata from custom domains
Reported by: | cauthmann | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 2.0.0 |
Component: | Utilities | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
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 in custom domains 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.
Attachments (1)
Change History (3)
by , 10 years ago
Attachment: | gdalinfo_metadata.patch added |
---|
comment:1 by , 10 years ago
Component: | GDAL_Raster → Utilities |
---|---|
Milestone: | → 2.0 |
Resolution: | → fixed |
Status: | new → closed |
Thanks. I've just slightly adapted your patch to get the exact format as before (i.e. re-add 2 space indentation for band metadata)
trunk r27478 "gdalinfo: display extra metadata domains attached to band, and refactor code a bit (derived from patch by cauthmann, #5542)"