Opened 14 years ago

Last modified 14 years ago

#3522 closed defect

GDALSetMetadataItem() not working in gdal 1.7 — at Initial Version

Reported by: christopheM Owned by: warmerdam
Priority: normal Milestone: 1.7.2
Component: GDAL_Raster Version: 1.6.0
Severity: normal Keywords: geotiff
Cc: warmerdam

Description

The function GDALSetMetadataItem() has stopped working in gdal 1.7. A call to GDALGetMetadataItem() shows the metadata that I am trying to write, however the final file saved does not show any new metadata.

As a work around, GDALSetMetadataItem() works after a call to the function GDALGetProjectionRef(), code below:

hSrcDS = GDALOpen(fileName, GA_Update); added in order to have area_or_point metadata with 1.7.x release GDALGetProjectionRef( hSrcDS ); CPLErr err = GDALSetMetadataItem(hSrcDS,GDALMD_AREA_OR_POINT, GDALMD_AOP_POINT,NULL); const char* pixelOrPoint=GDALGetMetadataItem(hSrcDS,GDALMD_AREA_OR_POINT,NULL); GDALClose(hSrcDS);

Change History (0)

Note: See TracTickets for help on using tickets.