[gdal-dev] get metadata from dataset

Frank Warmerdam warmerdam at pobox.com
Fri Oct 21 14:03:38 EDT 2011


On Fri, Oct 21, 2011 at 10:56 AM, Travis Kirstine
<traviskirstine at gmail.com> wrote:
> How do you get the "image structure metadata" (source_color_space,
> interleave etc....) displayed in gdalinfo using the API
>
> python
>
> ds = gdal.Open('file.tif', 0)
> ds.Metadata
> returns a empty dict

Travis,

You need to fetch the "IMAGE_STRUCTURE" domain.

eg.
print ds.GetMetadata('IMAGE_STRUCTURE')

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Software Developer


More information about the gdal-dev mailing list