int dataType = sm.getDataType();
if (sm instanceof PixelInterleavedSampleModel) {
switch(dataType) {
case DataBuffer.TYPE_BYTE:
return new ByteInterleavedRaster(sm, db, location);
case DataBuffer.TYPE_USHORT:
return new ShortInterleavedRaster(sm, db, location);
}
} else if (sm instanceof SinglePixelPackedSampleModel) {
switch(dataType) {
case DataBuffer.TYPE_BYTE:
return new ByteInterleavedRaster(sm, db, location);
case DataBuffer.TYPE_USHORT:
return new ShortInterleavedRaster(sm, db, location);
case DataBuffer.TYPE_INT: