Ticket #1130 (closed defect: worksforme)

Opened 2 years ago

Last modified 7 months ago

Setting the "AREA_OR_POINT" Metadata item on GeoTIFFs fails to work

Reported by: cmichaelis@happysquirrel.com Assigned to: warmerdam
Priority: high Milestone:
Component: GDAL_Raster Version: unspecified
Severity: minor Keywords:
Cc: mloskot

Description (Last modified by mloskot)

Hi there,

If I attempt to set the "AREA_OR_POINT" metadata item for a Geotiff in code, it seems to work - and I can even use GetMetadataItem?() to fetch it back and it is indeed correct.

However, it's never written to the file - if I close the file and reopen it, the metadata item is no longer set.

The line I'm using to set it:

rasterDataset->SetMetadataItem("AREA_OR_POINT", "AREA");

The same thing seems to happen with various capitalizations of either parameter. It also doesn't seem to take permanent effect if you pass this parameter to the driver during creation of a new file.

Thanks! --Chris Michaelis

Change History

10/11/07 16:36:39 changed by rouault

  • status changed from new to closed.
  • resolution set to worksforme.

This bug can't be reproduced any more. When read by gdalinfo, a file created by 'gdal_translate -mo "AREA_OR_POINT=AREA" src.tif dest.tif' shows AREA_OR_POINT=Area.

I think it has been fixed a long time ago. A svn blame on frmts/gtiff/geotiff.cpp seems to show that :

  • In r7491, the "AREA_OR_POINT" medata item was introduced and set from the GDALMD_AREA_OR_POINT key in the geotiff tag
  • In r7642, the GDALMD_AREA_OR_POINT key in the geotiff tag was written from the value of the metadata item.

This bug report may have been created between those 2 revisions.

11/23/07 07:35:46 changed by mloskot

  • cc set to mloskot.
  • description changed.