Ticket #1738 (closed defect: fixed)
Just Generated Pixel Interleaved TIFF Overviews Appear as Zeros
| Reported by: | warmerdam | Owned by: | warmerdam |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.4.3 |
| Component: | GDAL_Raster | Version: | svn-trunk |
| Severity: | normal | Keywords: | geotiff overview |
| Cc: |
Description
When internal overviews are built in a GeoTIFF file that is pixel interleaved, the overviews appear to be all zero valued. The same is not true of a band interleaved file. If the dataset is closed and reopened the imagery is fine. Tracking it down, IsBlockAvailable?() is returning FALSE when it presumably should be TRUE, but I'm not sure why. The problem can be demonstrated with this program and the attached file.
#include "gdal_priv.h"
int main()
{
GDALDataset *poDS;
GDALAllRegister();
system( "cp mfloat_base.tif mfloat32.tif" );
poDS = (GDALDataset *) GDALOpen( "mfloat32.tif", GA_Update );
int anOverviews[2] = { 2, 4 };
GDALRasterBand *poOver;
poDS->BuildOverviews( "NEAREST", 2, anOverviews, 0, NULL,
GDALDummyProgress, NULL );
poOver = poDS->GetRasterBand(3)->GetOverview(0);
double dfMax;
poOver->ComputeStatistics( FALSE, NULL, &dfMax, NULL, NULL,
NULL, NULL );
printf( "Max = %g\n", dfMax );
delete poDS;
}
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

