*/
public void dumpTags(XTIFFField[] gtfFields) {
StringBuffer buf = new StringBuffer();
for (int i = 0; i < gtfFields.length; i++) {
XTIFFField xtff = gtfFields[i];
int type = xtff.getType();
int tag = xtff.getTag();
buf.append("\n\tfield (" + i + ") - " + tag + " ("
+ KeyRegistry.getKey(KeyRegistry.GEOKEY, tag) + "): [");
switch (type) {
case XTIFFField.TIFF_ASCII:
String[] fieldStrings = xtff.getAsStrings();
for (int j = 0; j < fieldStrings.length; j++) {
buf.append(fieldStrings[j]);
if (j < fieldStrings.length - 1) {
buf.append(", ");
}
}
buf.append("]");
break;
case XTIFFField.TIFF_DOUBLE:
double[] fieldDoubles = xtff.getAsDoubles();
for (int j = 0; j < fieldDoubles.length; j++) {
buf.append(fieldDoubles[j]);
if (j < fieldDoubles.length - 1) {
buf.append(", ");
}
}
buf.append("]");
break;
case XTIFFField.TIFF_FLOAT:
double[] fieldFloats = xtff.getAsDoubles();
for (int j = 0; j < fieldFloats.length; j++) {
buf.append(fieldFloats[j]);
if (j < fieldFloats.length - 1) {
buf.append(", ");
}
}
buf.append("]");
break;
case XTIFFField.TIFF_BYTE:
case XTIFFField.TIFF_SBYTE:
byte[] fieldBytes = xtff.getAsBytes();
for (int j = 0; j < fieldBytes.length; j++) {
buf.append(fieldBytes[j]);
if (j < fieldBytes.length - 1) {
buf.append(", ");
}
}
buf.append("]");
break;
case XTIFFField.TIFF_SSHORT:
short[] fieldShorts = xtff.getAsShorts();
for (int j = 0; j < fieldShorts.length; j++) {
buf.append(fieldShorts[j]);
if (j < fieldShorts.length - 1) {
buf.append(", ");
}
}
buf.append("]");
break;
case XTIFFField.TIFF_LONG:
case XTIFFField.TIFF_SHORT:
long[] fieldLongs = xtff.getAsLongs();
for (int j = 0; j < fieldLongs.length; j++) {
buf.append(fieldLongs[j]);
if (j < fieldLongs.length - 1) {
buf.append(", ");
}
}
buf.append("]");
break;
case XTIFFField.TIFF_SLONG:
int[] fieldInts = xtff.getAsInts();
for (int j = 0; j < fieldInts.length; j++) {
buf.append(fieldInts[j]);
if (j < fieldInts.length - 1) {
buf.append(", ");
}
}
buf.append("]");
break;
case XTIFFField.TIFF_RATIONAL:
long[][] fieldRationals = xtff.getAsRationals();
for (int k = 0; k < fieldRationals.length; k++) {
buf.append("\n\t");
for (int j = 0; j < fieldRationals[0].length; j++) {
buf.append(fieldRationals[k][j]);
if (j < fieldRationals[k].length - 1) {
buf.append(", ");
}
}
}
buf.append("\n]");
break;
case XTIFFField.TIFF_SRATIONAL:
int[][] fieldSRationals = xtff.getAsSRationals();
for (int k = 0; k < fieldSRationals.length; k++) {
buf.append("\n\t");
for (int j = 0; j < fieldSRationals[0].length; j++) {
buf.append(fieldSRationals[k][j]);
if (j < fieldSRationals[k].length - 1) {