+ hTable.GetColorEntry(count));
}
}
}
RasterAttributeTable rat = hBand.GetDefaultRAT();
if( bShowRAT && rat != null )
{
System.out.print("<GDALRasterAttributeTable ");
double[] pdfRow0Min = new double[1];
double[] pdfBinSize = new double[1];
if (rat.GetLinearBinning(pdfRow0Min, pdfBinSize))
{
System.out.print("Row0Min=\"" + pdfRow0Min[0] + "\" BinSize=\"" + pdfBinSize[0] + "\">");
}
System.out.print("\n");
int colCount = rat.GetColumnCount();
for(int col=0;col<colCount;col++)
{
System.out.println(" <FieldDefn index=\"" + col + "\">");
System.out.println(" <Name>" + rat.GetNameOfCol(col) + "</Name>");
System.out.println(" <Type>" + rat.GetTypeOfCol(col) + "</Type>");
System.out.println(" <Usage>" + rat.GetUsageOfCol(col) + "</Usage>");
System.out.println(" </FieldDefn>");
}
int rowCount = rat.GetRowCount();
for(int row=0;row<rowCount;row++)
{
System.out.println(" <Row index=\"" + row + "\">");
for(int col=0;col<colCount;col++)
{
System.out.println(" <F>" + rat.GetValueAsString(row, col)+ "</F>");
}
System.out.println(" </Row>");
}
System.out.println("</GDALRasterAttributeTable>");
}