id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc 4021,AIG datasets with colormap,rprinceley,warmerdam,"In HFARasterBand::HFARasterBand(), we need a way to specify that padfBins should be ignored. This is for compatibility with ArcGIS 9.x which does not map entries to ""BinValues"" (when reading .aux). {{{ /* -------------------------------------------------------------------- */ /* Collect color table if present. */ /* -------------------------------------------------------------------- */ double *padfRed, *padfGreen, *padfBlue, *padfAlpha, *padfBins; int nColors; if( iOverview == -1 && HFAGetPCT( hHFA, nBand, &nColors, &padfRed, &padfGreen, &padfBlue, &padfAlpha, &padfBins ) == CE_None && nColors > 0 ) { poCT = new GDALColorTable(); for( int iColor = 0; iColor < nColors; iColor++ ) { GDALColorEntry sEntry; // The following mapping assigns ""equal sized"" section of // the [0...1] range to each possible output value and avoid // rounding issues for the ""normal"" values generated using n/255. // See bug #1732 for some discussion. sEntry.c1 = MIN(255,(short) (padfRed[iColor] * 256)); sEntry.c2 = MIN(255,(short) (padfGreen[iColor] * 256)); sEntry.c3 = MIN(255,(short) (padfBlue[iColor] * 256)); sEntry.c4 = MIN(255,(short) (padfAlpha[iColor] * 256)); if( padfBins != NULL ) poCT->SetColorEntry( (int) padfBins[iColor], &sEntry ); else poCT->SetColorEntry( iColor, &sEntry ); }}} The attached dataset is supposed to have 14 entries in it's color table (GDAL creates 19 based on ""BinValues"" mapping). ",defect,closed,normal,1.9.0,GDAL_Raster,svn-trunk,normal,fixed,HFA AIG,gaopeng