Opened 2 years ago

Closed 2 years ago

#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:


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:

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

Change History (3)

comment:1 Changed 2 years 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 2 years ago by sgillies

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

comment:3 Changed 2 years ago by sgillies

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