#6961 closed defect (wontfix)

GetMetadata() needs special case for TIFF domain as GetMetadataItem()

Reported by: sgillies Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: unspecified
Severity: normal Keywords:
Cc:

Description

In GetMetadataItem?() we have

    if( pszName != NULL && pszDomain != NULL && EQUAL(pszDomain, "TIFF") )
    {
    ...

but there is no such special case for GetMetadata?(), with the result that dataset.GetMetadata_Dict('TIFF') (GDAL Python bindings) and dataset.tags(ns='TIFF') (Rasterio) return empty collections when there is TIFF domain metadata attached to the dataset.

Downstream bug report: https://github.com/mapbox/rasterio/issues/1077.

I think I see a feasible workaround for now, just want to make a note for the future.

Change History (3)

comment:1 Changed 20 months ago by Even Rouault

Interesting. I wasn't aware of people actually using this feature outside of GDAL autotest suite

The behaviour with the TIFF metadata dmoain is indeed a breach of the general contract of GetMetadata?() and GetMetadataItem?()

But I'm not completely sure that implementing GetMetadata?("TIFF") would be a good idea. For a very large image with millions of blocks, this would mean returning a very large list of items.

comment:2 Changed 20 months ago by sgillies

I agree that this isn't a great idea. Thanks for the explanation!

comment:3 Changed 20 months ago by sgillies

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.