From be455492a1a618c97f42f5a4956ad1c09cb72b17 Mon Sep 17 00:00:00 2001 From: David Russo Date: Wed, 14 Aug 2019 17:37:38 +0100 Subject: [PATCH 01/10] IFF: Improve validation for chunk IDs Values above the printable ASCII range no longer validate, nor IDs in which spaces precede printable characters, per the IFF, AIFF, and RIFF specifications. --- .../hul/ois/jhove/module/iff/ChunkHeader.java | 100 ++++++++++++------ .../jhove/module/iff/MessageConstants.java | 9 +- .../jhove/module/iff/ErrorMessages.properties | 5 +- .../hul/ois/jhove/module/WaveModule.java | 7 +- 4 files changed, 73 insertions(+), 48 deletions(-) diff --git a/jhove-modules/aiff-hul/src/main/java/edu/harvard/hul/ois/jhove/module/iff/ChunkHeader.java b/jhove-modules/aiff-hul/src/main/java/edu/harvard/hul/ois/jhove/module/iff/ChunkHeader.java index 23cbeecf7..982a1f18c 100644 --- a/jhove-modules/aiff-hul/src/main/java/edu/harvard/hul/ois/jhove/module/iff/ChunkHeader.java +++ b/jhove-modules/aiff-hul/src/main/java/edu/harvard/hul/ois/jhove/module/iff/ChunkHeader.java @@ -13,67 +13,97 @@ * This class encapsulates an IFF/AIFF chunk header. * * @author Gary McGath - * */ public class ChunkHeader { + private static final int CHUNK_ID_LENGTH = 4; + private ModuleBase _module; private RepInfo _repInfo; + private String _chunkId; // Four-character ID of the chunk private long _size; // This does not include the 8 bytes of header - private String _chunkID; // 4-character ID of the chunk - + /** - * Constructor. + * Constructor. * - * @param module The module under which the chunk is being read - * @param info The RepInfo object being used by the module + * @param module The module under which the chunk is being read + * @param info The RepInfo object being used by the module */ - public ChunkHeader (ModuleBase module, RepInfo info) + public ChunkHeader(ModuleBase module, RepInfo info) { _module = module; _repInfo = info; } - - + /** - * Reads the header of a chunk. If _chunkID is non-null, - * it's assumed to have already been read. + * Reads and validates the header of a chunk. + * + * If {@code _chunkId} is non-null it's assumed to have already been read. */ - public boolean readHeader (DataInputStream dstrm) throws IOException + public boolean readHeader(DataInputStream dstrm) throws IOException { - StringBuffer id = new StringBuffer(4); - for (int i = 0; i < 4; i++) { - int ch = ModuleBase.readUnsignedByte (dstrm, _module); - if (ch < 32) { - String hx = Integer.toHexString (ch); - if (hx.length () < 2) { - hx = "0" + hx; - } - _repInfo.setMessage (new ErrorMessage - (MessageConstants.IFF_HUL_1, - MessageConstants.IFF_HUL_1_SUB.getMessage() + hx, - _module.getNByte ())); - _repInfo.setWellFormed (false); + boolean idBeginsWithSpace = false; + boolean spacePrecedesPrintableCharacters = false; + StringBuilder id = new StringBuilder(CHUNK_ID_LENGTH); + + for (int i = 0; i < CHUNK_ID_LENGTH; i++) { + + boolean printableCharacter = false; + int ch = ModuleBase.readUnsignedByte(dstrm, _module); + + // Characters should be in the printable ASCII range + if (ch < 32 || ch > 126) { + _repInfo.setMessage(new ErrorMessage( + MessageConstants.IFF_HUL_1, + String.format( + MessageConstants.IFF_HUL_1_SUB.getMessage(), + ch), + _module.getNByte() - 1)); + _repInfo.setWellFormed(false); return false; } + + if (ch == ' ') { + if (i == 0) { + idBeginsWithSpace = true; + } + } else { + printableCharacter = true; + } + + if (idBeginsWithSpace && printableCharacter) { + spacePrecedesPrintableCharacters = true; + } + id.append((char) ch); } - _chunkID = id.toString (); - _size = ModuleBase.readUnsignedInt (dstrm, _module.isBigEndian (), _module); + + _chunkId = id.toString(); + + // Spaces should not precede printable characters + if (spacePrecedesPrintableCharacters) { + _repInfo.setMessage(new ErrorMessage( + MessageConstants.IFF_HUL_2, "\"" + _chunkId + "\"", + _module.getNByte() - CHUNK_ID_LENGTH)); + _repInfo.setValid(false); + } + + _size = ModuleBase.readUnsignedInt(dstrm, _module.isBigEndian(), _module); + return true; } - - + + /** Sets the chunk type, which is a 4-character code, directly. */ - public void setID (String id) + public void setID(String id) { - _chunkID = id; + _chunkId = id; } - + /** Returns the chunk type, which is a 4-character code */ - public String getID () + public String getID() { - return _chunkID; + return _chunkId; } /** Sets the chunk size */ @@ -83,7 +113,7 @@ public void setSize(long size) } /** Returns the chunk size (excluding the first 8 bytes) */ - public long getSize () + public long getSize() { return _size; } diff --git a/jhove-modules/aiff-hul/src/main/java/edu/harvard/hul/ois/jhove/module/iff/MessageConstants.java b/jhove-modules/aiff-hul/src/main/java/edu/harvard/hul/ois/jhove/module/iff/MessageConstants.java index dd169d654..022fcd650 100644 --- a/jhove-modules/aiff-hul/src/main/java/edu/harvard/hul/ois/jhove/module/iff/MessageConstants.java +++ b/jhove-modules/aiff-hul/src/main/java/edu/harvard/hul/ois/jhove/module/iff/MessageConstants.java @@ -15,15 +15,8 @@ public enum MessageConstants { INSTANCE; private static final JhoveMessageFactory messageFactory = JhoveMessages.getInstance("edu.harvard.hul.ois.jhove.module.iff.ErrorMessages"); //$NON-NLS-1$ - /** - * Info messages - */ - public static final String INF_CHUNK_TYPE_IGNORED = "Ignored chunk type with ID: "; - /** - * Error messages - */ public static final JhoveMessage IFF_HUL_1 = messageFactory.getMessage("IFF-HUL-1"); //$NON-NLS-1$ public static final JhoveMessage IFF_HUL_1_SUB = messageFactory.getMessage("IFF-HUL-1-SUB"); //$NON-NLS-1$ - + public static final JhoveMessage IFF_HUL_2 = messageFactory.getMessage("IFF-HUL-2"); //$NON-NLS-1$ } diff --git a/jhove-modules/aiff-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/iff/ErrorMessages.properties b/jhove-modules/aiff-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/iff/ErrorMessages.properties index 8bf5c87f1..6f261ee95 100644 --- a/jhove-modules/aiff-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/iff/ErrorMessages.properties +++ b/jhove-modules/aiff-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/iff/ErrorMessages.properties @@ -1,2 +1,3 @@ -IFF-HUL-1 = Invalid character in Chunk ID -IFF-HUL-1-SUB = Character = 0x +IFF-HUL-1 = Chunk ID character outside printable ASCII range +IFF-HUL-1-SUB = Character = 0x%02X +IFF-HUL-2 = Chunk ID contains space before printable characters \ No newline at end of file diff --git a/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/WaveModule.java b/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/WaveModule.java index 121f7866a..185778fd7 100644 --- a/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/WaveModule.java +++ b/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/WaveModule.java @@ -827,7 +827,7 @@ protected boolean readChunk(RepInfo info) throws IOException { JhoveMessage message = JhoveMessages.getMessageInstance( MessageConstants.WAVE_HUL_7.getId(), String.format(MessageConstants.WAVE_HUL_7.getMessage(), - chunkID)); + "\"" + chunkID + "\"")); info.setMessage(new InfoMessage(message, _nByte)); } @@ -853,13 +853,14 @@ protected boolean readChunk(RepInfo info) throws IOException { JhoveMessage message = JhoveMessages.getMessageInstance( MessageConstants.WAVE_HUL_26.getId(), String.format(MessageConstants.WAVE_HUL_26.getMessage(), - chunkID)); + "\"" + chunkID + "\"")); info.setMessage(new InfoMessage(message, _nByte)); bytesRemaining -= skipBytes(_dstream, chunkSize - dataRead, this); } else { throw new EOFException( - MessageConstants.SUB_MESS_TRUNCATED_CHUNK + chunkID); + MessageConstants.SUB_MESS_TRUNCATED_CHUNK + + "\"" + chunkID + "\""); } } From cd18991881d1137aacd69880a69d15e905a38340 Mon Sep 17 00:00:00 2001 From: David Russo Date: Fri, 16 Aug 2019 10:42:58 +0100 Subject: [PATCH 02/10] CORE: Fix dropping of submessage information --- .../harvard/hul/ois/jhove/messages/JhoveMessageImpl.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/jhove-core/src/main/java/edu/harvard/hul/ois/jhove/messages/JhoveMessageImpl.java b/jhove-core/src/main/java/edu/harvard/hul/ois/jhove/messages/JhoveMessageImpl.java index 0b8089d97..e2e3e1786 100644 --- a/jhove-core/src/main/java/edu/harvard/hul/ois/jhove/messages/JhoveMessageImpl.java +++ b/jhove-core/src/main/java/edu/harvard/hul/ois/jhove/messages/JhoveMessageImpl.java @@ -14,10 +14,6 @@ final class JhoveMessageImpl implements JhoveMessage { private final String message; private final String subMessage; - private JhoveMessageImpl(final String id, final String message) { - this(id, message, ""); - } - private JhoveMessageImpl(final String id, final String message, final String subMessage) { this.id = id; this.message = message; @@ -25,7 +21,7 @@ private JhoveMessageImpl(final String id, final String message, final String sub } static JhoveMessage getInstance(final String id, final String message, final String subMessage) { - return new JhoveMessageImpl(id, message); + return new JhoveMessageImpl(id, message, subMessage); } @Override @@ -110,6 +106,4 @@ public boolean equals(Object obj) { } return true; } - - } From decc8f2a759b1ea28489769ffd028a698e02c05d Mon Sep 17 00:00:00 2001 From: David Russo Date: Fri, 16 Aug 2019 15:01:39 +0100 Subject: [PATCH 03/10] WAVE: Improve error reporting and accuracy - Improved offset reporting - Reinstated WAVE-HUL-4 reporting - Made more strings translatable - Included reporting of unrecognized data in the top-most RIFF chunk as already existed for sub-chunks --- .../hul/ois/jhove/module/WaveModule.java | 156 ++++++++++++------ .../jhove/module/wave/AssocDataListChunk.java | 11 +- .../ois/jhove/module/wave/ListInfoChunk.java | 11 +- .../jhove/module/wave/MessageConstants.java | 28 ++-- .../module/wave/ErrorMessages.properties | 7 +- 5 files changed, 129 insertions(+), 84 deletions(-) diff --git a/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/WaveModule.java b/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/WaveModule.java index 185778fd7..d72359242 100644 --- a/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/WaveModule.java +++ b/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/WaveModule.java @@ -101,6 +101,9 @@ public class WaveModule extends ModuleBase { /** Length of chunk headers in bytes */ private static final int CHUNK_HEADER_LENGTH = 8; + /** Length of chunk size fields in bytes */ + private static final int CHUNK_SIZE_LENGTH = 4; + /** Value indicating a required 64-bit data size lookup */ public static final long LOOKUP_EXTENDED_DATA_SIZE = 0xFFFFFFFFL; @@ -372,8 +375,9 @@ public int parse(InputStream stream, RepInfo info, int parseIndex) { String formType = read4Chars(_dstream); bytesRemaining -= RIFF_FORM_TYPE_LENGTH; if (!"WAVE".equals(formType)) { - info.setMessage( - new ErrorMessage(MessageConstants.WAVE_HUL_2, _nByte)); + info.setMessage(new ErrorMessage( + MessageConstants.WAVE_HUL_2, + _nByte - RIFF_FORM_TYPE_LENGTH)); info.setWellFormed(false); return 0; } @@ -403,7 +407,8 @@ public int parse(InputStream stream, RepInfo info, int parseIndex) { } } else { info.setMessage(new ErrorMessage( - MessageConstants.WAVE_HUL_23, _nByte)); + MessageConstants.WAVE_HUL_23, + CHUNK_HEADER_LENGTH + RIFF_FORM_TYPE_LENGTH)); info.setWellFormed(false); return 0; } @@ -414,10 +419,19 @@ public int parse(InputStream stream, RepInfo info, int parseIndex) { break; } } + + if (bytesRemaining > 0) { + // The file has been truncated or there + // remains unexpected chunk data to skip + remainingDataInfo(_dstream, info, bytesRemaining, + firstFourChars); + } + } catch (EOFException eofe) { info.setWellFormed(false); - String subMessage = MessageConstants.SUB_MESS_BYTES_MISSING - + bytesRemaining; + String subMessage = String.format( + MessageConstants.WAVE_HUL_3_SUB.getMessage(), + bytesRemaining); if (eofe.getMessage() != null) { subMessage += "; " + eofe.getMessage(); } @@ -427,8 +441,8 @@ public int parse(InputStream stream, RepInfo info, int parseIndex) { e.printStackTrace(); info.setWellFormed(false); JhoveMessage message = JhoveMessages.getMessageInstance( - MessageConstants.WAVE_HUL_3.getId(), - String.format(MessageConstants.WAVE_HUL_3.getMessage(), + MessageConstants.WAVE_HUL_4.getId(), + String.format(MessageConstants.WAVE_HUL_4.getMessage(), e.getClass().getName() + ", " + e.getMessage())); info.setMessage(new ErrorMessage(message, _nByte)); return 0; @@ -664,18 +678,18 @@ public void setWaveFormatExtensible(boolean b) { @Override protected void initParse() { super.initParse(); - _propList = new LinkedList(); - _notes = new LinkedList(); - _labels = new LinkedList(); - _labeledText = new LinkedList(); - _samples = new LinkedList(); + _propList = new LinkedList<>(); + _notes = new LinkedList<>(); + _labels = new LinkedList<>(); + _labeledText = new LinkedList<>(); + _samples = new LinkedList<>(); firstSampleOffsetMarked = false; waveCodec = -1; sampleCount = 0; bytesRemaining = 0; extendedRiffSize = 0; extendedSampleLength = 0; - extendedChunkSizes = new HashMap(); + extendedChunkSizes = new HashMap<>(); _metadata = new Property("WAVEMetadata", PropertyType.PROPERTY, PropertyArity.LIST, _propList); @@ -715,14 +729,17 @@ protected boolean readChunk(RepInfo info) throws IOException { Chunk chunk = null; ChunkHeader chunkh = new ChunkHeader(this, info); + + long dataRead = _nByte; if (!chunkh.readHeader(_dstream)) { + bytesRemaining -= _nByte - dataRead; return false; } - String chunkID = chunkh.getID(); + String chunkId = chunkh.getID(); long chunkSize = chunkh.getSize(); if (hasExtendedDataSizes() && chunkSize == LOOKUP_EXTENDED_DATA_SIZE) { - Long extendedSize = extendedChunkSizes.get(chunkID); + Long extendedSize = extendedChunkSizes.get(chunkId); if (extendedSize != null) { chunkh.setSize(extendedSize); chunkSize = extendedSize; @@ -733,22 +750,23 @@ protected boolean readChunk(RepInfo info) throws IOException { // Check if the chunk size is greater than the RIFF's remaining length if (Long.compareUnsigned(bytesRemaining, chunkSize) < 0) { - info.setMessage( - new ErrorMessage(MessageConstants.WAVE_HUL_6, _nByte)); + info.setMessage(new ErrorMessage( + MessageConstants.WAVE_HUL_6, _nByte - CHUNK_SIZE_LENGTH)); info.setWellFormed(false); return false; } - if ("fmt ".equals(chunkID)) { + if ("fmt ".equals(chunkId)) { if (formatChunkSeen) { dupChunkError(info, "Format"); } chunk = new FormatChunk(this, chunkh, _dstream); formatChunkSeen = true; - } else if ("data".equals(chunkID)) { + } else if ("data".equals(chunkId)) { if (!formatChunkSeen) { - info.setMessage( - new ErrorMessage(MessageConstants.WAVE_HUL_25, _nByte)); + info.setMessage(new ErrorMessage( + MessageConstants.WAVE_HUL_25, + _nByte - CHUNK_HEADER_LENGTH)); info.setValid(false); } if (dataChunkSeen) { @@ -756,68 +774,68 @@ protected boolean readChunk(RepInfo info) throws IOException { } chunk = new DataChunk(this, chunkh, _dstream); dataChunkSeen = true; - } else if ("ds64".equals(chunkID)) { + } else if ("ds64".equals(chunkId)) { chunk = new DataSize64Chunk(this, chunkh, _dstream); dataSize64ChunkSeen = true; - } else if ("fact".equals(chunkID)) { + } else if ("fact".equals(chunkId)) { chunk = new FactChunk(this, chunkh, _dstream); factChunkSeen = true; // Are multiple 'fact' chunks allowed? - } else if ("note".equals(chunkID)) { + } else if ("note".equals(chunkId)) { chunk = new NoteChunk(this, chunkh, _dstream); // Multiple note chunks are allowed - } else if ("labl".equals(chunkID)) { + } else if ("labl".equals(chunkId)) { chunk = new LabelChunk(this, chunkh, _dstream); // Multiple label chunks are allowed - } else if ("list".equals(chunkID)) { + } else if ("list".equals(chunkId)) { chunk = new AssocDataListChunk(this, chunkh, _dstream, info); // Are multiple chunks allowed? Who knows? - } else if ("LIST".equals(chunkID)) { + } else if ("LIST".equals(chunkId)) { chunk = new ListInfoChunk(this, chunkh, _dstream, info); // Multiple list chunks must be OK, since there can // be different types, e.g., an INFO list and an exif list. - } else if ("smpl".equals(chunkID)) { + } else if ("smpl".equals(chunkId)) { chunk = new SampleChunk(this, chunkh, _dstream); // Multiple sample chunks are allowed -- I think - } else if ("inst".equals(chunkID)) { + } else if ("inst".equals(chunkId)) { if (instrumentChunkSeen) { dupChunkError(info, "Instrument"); } chunk = new InstrumentChunk(this, chunkh, _dstream); // Only one instrument chunk is allowed instrumentChunkSeen = true; - } else if ("mext".equals(chunkID)) { + } else if ("mext".equals(chunkId)) { if (mpegChunkSeen) { dupChunkError(info, "MPEG Audio Extension"); } chunk = new MpegChunk(this, chunkh, _dstream); // I think only one MPEG chunk is allowed mpegChunkSeen = true; - } else if ("cart".equals(chunkID)) { + } else if ("cart".equals(chunkId)) { if (cartChunkSeen) { dupChunkError(info, "Cart"); } chunk = new CartChunk(this, chunkh, _dstream); cartChunkSeen = true; - } else if ("bext".equals(chunkID)) { + } else if ("bext".equals(chunkId)) { if (broadcastExtChunkSeen) { dupChunkError(info, "Broadcast Audio Extension"); } chunk = new BroadcastExtChunk(this, chunkh, _dstream); broadcastExtChunkSeen = true; - } else if ("levl".equals(chunkID)) { + } else if ("levl".equals(chunkId)) { if (peakChunkSeen) { dupChunkError(info, "Peak Envelope"); } chunk = new PeakEnvelopeChunk(this, chunkh, _dstream); peakChunkSeen = true; - } else if ("link".equals(chunkID)) { + } else if ("link".equals(chunkId)) { if (linkChunkSeen) { dupChunkError(info, "Link"); } chunk = new LinkChunk(this, chunkh, _dstream); linkChunkSeen = true; - } else if ("cue ".equals(chunkID)) { + } else if ("cue ".equals(chunkId)) { if (cueChunkSeen) { dupChunkError(info, "Cue Points"); } @@ -827,11 +845,12 @@ protected boolean readChunk(RepInfo info) throws IOException { JhoveMessage message = JhoveMessages.getMessageInstance( MessageConstants.WAVE_HUL_7.getId(), String.format(MessageConstants.WAVE_HUL_7.getMessage(), - "\"" + chunkID + "\"")); - info.setMessage(new InfoMessage(message, _nByte)); + "\"" + chunkId + "\"")); + info.setMessage(new InfoMessage(message, + _nByte - CHUNK_HEADER_LENGTH)); } - long dataRead = _nByte; + dataRead = _nByte; if (chunk != null) { if (!chunk.readChunk(info)) { return false; @@ -847,21 +866,7 @@ protected boolean readChunk(RepInfo info) throws IOException { if (dataRead < chunkSize) { // The file has been truncated or there // remains unexpected chunk data to skip - if (_dstream.available() > 0) { - // Pass over any remaining chunk data so that - // we align with the start of any subsequent chunk - JhoveMessage message = JhoveMessages.getMessageInstance( - MessageConstants.WAVE_HUL_26.getId(), - String.format(MessageConstants.WAVE_HUL_26.getMessage(), - "\"" + chunkID + "\"")); - info.setMessage(new InfoMessage(message, _nByte)); - bytesRemaining -= skipBytes(_dstream, chunkSize - dataRead, - this); - } else { - throw new EOFException( - MessageConstants.SUB_MESS_TRUNCATED_CHUNK - + "\"" + chunkID + "\""); - } + remainingDataInfo(_dstream, info, chunkSize - dataRead, chunkId); } if ((chunkSize & 1) != 0) { @@ -872,6 +877,46 @@ protected boolean readChunk(RepInfo info) throws IOException { return true; } + /** + * Reports and passes over any data still remaining following an attempt + * at reading a chunk. This ensures we align with the start of any + * subsequent chunk. + */ + private void remainingDataInfo(DataInputStream stream, RepInfo info, + long bytesToProcess, String chunkId) + throws IOException { + + if (stream.available() > 0) { + + boolean nullData = true; + long bytesProcessed = 0; + + // Check for non-null data + while (nullData && bytesProcessed < bytesToProcess) { + int b = readUnsignedByte(stream, this); + if (b != 0) nullData = false; + this.bytesRemaining--; + bytesProcessed++; + } + + // Skip any remaining data + bytesProcessed += skipBytes(stream, + bytesToProcess - bytesProcessed, this); + this.bytesRemaining -= bytesProcessed; + + info.setMessage(new InfoMessage( + MessageConstants.WAVE_HUL_26, + String.format(MessageConstants.WAVE_HUL_26_SUB.getMessage(), + "\"" + chunkId + "\"", bytesProcessed, nullData), + _nByte - bytesProcessed)); + + } else { + throw new EOFException( + MessageConstants.SUB_MESS_TRUNCATED_CHUNK + + "\"" + chunkId + "\""); + } + } + /** Returns the module's AES metadata. */ public AESAudioMetadata getAESMetadata() { return _aesMetadata; @@ -882,7 +927,8 @@ protected void dupChunkError(RepInfo info, String chunkName) { JhoveMessage message = JhoveMessages.getMessageInstance( MessageConstants.WAVE_HUL_8.getId(), String.format( MessageConstants.WAVE_HUL_8.getMessage(), chunkName)); - info.setMessage(new ErrorMessage(message, _nByte)); + info.setMessage(new ErrorMessage( + message, _nByte - CHUNK_HEADER_LENGTH)); info.setValid(false); } @@ -904,7 +950,7 @@ public Property buildBitmaskProperty(int val, String name, if (_je != null && _je.getShowRawFlag()) { return new Property(name, PropertyType.INTEGER, val); } - List slist = new LinkedList(); + List slist = new LinkedList<>(); try { for (int i = 0; i < oneValueNames.length; i++) { String s; diff --git a/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/wave/AssocDataListChunk.java b/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/wave/AssocDataListChunk.java index 78016db1b..e64d8b590 100644 --- a/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/wave/AssocDataListChunk.java +++ b/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/wave/AssocDataListChunk.java @@ -20,10 +20,11 @@ * several different types of informational chunks. * * @author Gary McGath - * */ public class AssocDataListChunk extends Superchunk { + private static final int TYPE_LENGTH = 4; + /** * Constructor. * @@ -57,11 +58,12 @@ public boolean readChunk(RepInfo info) throws IOException { // this was intended to allow other list structures (don't ask // why), but any others will be considered non-conforming. String typeID = module.read4Chars(_dstream); - bytesLeft -= 4; + bytesLeft -= TYPE_LENGTH; if (!"adtl".equals(typeID)) { info.setMessage(new ErrorMessage(MessageConstants.WAVE_HUL_9, - MessageConstants.SUB_MESS_TYPE + typeID, - _module.getNByte())); + String.format(MessageConstants.WAVE_HUL_9_SUB.getMessage(), + typeID), + _module.getNByte() - TYPE_LENGTH)); info.setWellFormed(false); return false; } @@ -97,5 +99,4 @@ public boolean readChunk(RepInfo info) throws IOException { } return true; } - } diff --git a/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/wave/ListInfoChunk.java b/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/wave/ListInfoChunk.java index f04f2fddb..6582daa05 100644 --- a/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/wave/ListInfoChunk.java +++ b/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/wave/ListInfoChunk.java @@ -23,10 +23,11 @@ * and treated as an error. * * @author Gary McGath - * */ public class ListInfoChunk extends Superchunk { + private static final int TYPE_LENGTH = 4; + /** * Constructor. * @@ -50,12 +51,11 @@ public ListInfoChunk(ModuleBase module, ChunkHeader hdr, * * @return false if the chunk is structurally * invalid, otherwise true - * */ @Override public boolean readChunk(RepInfo info) throws IOException { String typeID = ((WaveModule) _module).read4Chars(_dstream); - bytesLeft -= 4; + bytesLeft -= TYPE_LENGTH; if ("INFO".equals(typeID)) { return readInfoChunk(info); } else if ("exif".equals(typeID)) { @@ -66,7 +66,8 @@ public boolean readChunk(RepInfo info) throws IOException { JhoveMessage message = JhoveMessages.getMessageInstance( MessageConstants.WAVE_HUL_15.getId(), String.format( MessageConstants.WAVE_HUL_15.getMessage(), typeID)); - info.setMessage(new ErrorMessage(message, _module.getNByte())); + info.setMessage(new ErrorMessage( + message, _module.getNByte() - TYPE_LENGTH)); info.setWellFormed(false); return false; } @@ -104,7 +105,7 @@ private boolean readInfoChunk(RepInfo info) throws IOException { return true; } - /* + /** * The Exif chunk, unlike the Info chunk, has subchunks which aren't * homogeneous. */ diff --git a/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/wave/MessageConstants.java b/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/wave/MessageConstants.java index e964d5140..cf4c06711 100644 --- a/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/wave/MessageConstants.java +++ b/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/wave/MessageConstants.java @@ -38,42 +38,36 @@ public enum MessageConstants { public static final JhoveMessageFactory messageFactory = JhoveMessages .getInstance("edu.harvard.hul.ois.jhove.module.wave.ErrorMessages"); - public static final String SUB_MESS_TYPE = "Type = "; - public static final String SUB_MESS_BYTES_MISSING = "Bytes missing = "; public static final String SUB_MESS_TRUNCATED_CHUNK = "Truncated chunk = "; - /** - * Information messages - */ - public static final JhoveMessage WAVE_HUL_7 = messageFactory.getMessage("WAVE-HUL-7"); - public static final JhoveMessage WAVE_HUL_10 = messageFactory.getMessage("WAVE-HUL-10"); - public static final JhoveMessage WAVE_HUL_16 = messageFactory.getMessage("WAVE-HUL-16"); - public static final JhoveMessage WAVE_HUL_17 = messageFactory.getMessage("WAVE-HUL-17"); - public static final JhoveMessage WAVE_HUL_18 = messageFactory.getMessage("WAVE-HUL-18"); - public static final JhoveMessage WAVE_HUL_19 = messageFactory.getMessage("WAVE-HUL-19"); - public static final JhoveMessage WAVE_HUL_22 = messageFactory.getMessage("WAVE-HUL-22"); - public static final JhoveMessage WAVE_HUL_26 = messageFactory.getMessage("WAVE-HUL-26"); - - /** - * Error messages - */ public static final JhoveMessage WAVE_HUL_1 = messageFactory.getMessage("WAVE-HUL-1"); public static final JhoveMessage WAVE_HUL_2 = messageFactory.getMessage("WAVE-HUL-2"); public static final JhoveMessage WAVE_HUL_3 = messageFactory.getMessage("WAVE-HUL-3"); + public static final JhoveMessage WAVE_HUL_3_SUB = messageFactory.getMessage("WAVE-HUL-3-SUB"); public static final JhoveMessage WAVE_HUL_4 = messageFactory.getMessage("WAVE-HUL-4"); public static final JhoveMessage WAVE_HUL_5 = messageFactory.getMessage("WAVE-HUL-5"); public static final JhoveMessage WAVE_HUL_6 = messageFactory.getMessage("WAVE-HUL-6"); + public static final JhoveMessage WAVE_HUL_7 = messageFactory.getMessage("WAVE-HUL-7"); public static final JhoveMessage WAVE_HUL_8 = messageFactory.getMessage("WAVE-HUL-8"); public static final JhoveMessage WAVE_HUL_9 = messageFactory.getMessage("WAVE-HUL-9"); + public static final JhoveMessage WAVE_HUL_9_SUB = messageFactory.getMessage("WAVE-HUL-9-SUB"); + public static final JhoveMessage WAVE_HUL_10 = messageFactory.getMessage("WAVE-HUL-10"); public static final JhoveMessage WAVE_HUL_11 = messageFactory.getMessage("WAVE-HUL-11"); public static final JhoveMessage WAVE_HUL_12 = messageFactory.getMessage("WAVE-HUL-12"); public static final JhoveMessage WAVE_HUL_13 = messageFactory.getMessage("WAVE-HUL-13"); public static final JhoveMessage WAVE_HUL_14 = messageFactory.getMessage("WAVE-HUL-14"); public static final JhoveMessage WAVE_HUL_15 = messageFactory.getMessage("WAVE-HUL-15"); + public static final JhoveMessage WAVE_HUL_16 = messageFactory.getMessage("WAVE-HUL-16"); + public static final JhoveMessage WAVE_HUL_17 = messageFactory.getMessage("WAVE-HUL-17"); + public static final JhoveMessage WAVE_HUL_18 = messageFactory.getMessage("WAVE-HUL-18"); + public static final JhoveMessage WAVE_HUL_19 = messageFactory.getMessage("WAVE-HUL-19"); public static final JhoveMessage WAVE_HUL_20 = messageFactory.getMessage("WAVE-HUL-20"); public static final JhoveMessage WAVE_HUL_21 = messageFactory.getMessage("WAVE-HUL-21"); + public static final JhoveMessage WAVE_HUL_22 = messageFactory.getMessage("WAVE-HUL-22"); public static final JhoveMessage WAVE_HUL_23 = messageFactory.getMessage("WAVE-HUL-23"); public static final JhoveMessage WAVE_HUL_24 = messageFactory.getMessage("WAVE-HUL-24"); public static final JhoveMessage WAVE_HUL_25 = messageFactory.getMessage("WAVE-HUL-25"); + public static final JhoveMessage WAVE_HUL_26 = messageFactory.getMessage("WAVE-HUL-26"); + public static final JhoveMessage WAVE_HUL_26_SUB = messageFactory.getMessage("WAVE-HUL-26-SUB"); public static final JhoveMessage WAVE_HUL_27 = messageFactory.getMessage("WAVE-HUL-27"); } diff --git a/jhove-modules/wave-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/wave/ErrorMessages.properties b/jhove-modules/wave-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/wave/ErrorMessages.properties index f7cf6663f..0874724b0 100644 --- a/jhove-modules/wave-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/wave/ErrorMessages.properties +++ b/jhove-modules/wave-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/wave/ErrorMessages.properties @@ -1,12 +1,14 @@ WAVE-HUL-1 = File does not start with RIFF header WAVE-HUL-2 = Form type in RIFF header is not WAVE WAVE-HUL-3 = Unexpected end of file -WAVE-HUL-4 = Exception reading file: S5 +WAVE-HUL-3-SUB = Bytes missing = %s +WAVE-HUL-4 = Exception reading file: %s WAVE-HUL-5 = No Format chunk found WAVE-HUL-6 = Invalid chunk size WAVE-HUL-7 = Ignored unrecognized chunk: %s WAVE-HUL-8 = Duplicate chunks found for type: %s WAVE-HUL-9 = Unknown list type in Associated Data List chunk +WAVE-HUL-9-SUB = Type = %s WAVE-HUL-10 = Ignored Associated Data chunk of type: %s WAVE-HUL-11 = Exif User Comment chunk is too short WAVE-HUL-12 = Incorrect length for Exif Version chunk @@ -23,5 +25,6 @@ WAVE-HUL-22 = File too large to validate WAVE-HUL-23 = Data Size 64 chunk not in required location WAVE-HUL-24 = No Data chunk found WAVE-HUL-25 = Data chunk appears before Format chunk -WAVE-HUL-26 = Ignored unrecognized data in chunk: %s +WAVE-HUL-26 = Ignored unrecognized data remaining in chunk +WAVE-HUL-26-SUB = Chunk = %s; Bytes = %s; Null = %s WAVE-HUL-27 = Unrecognized BWF version: %s From 8bd24df0a04f6f498be2fb368bbb6381aecbc350 Mon Sep 17 00:00:00 2001 From: David Russo Date: Fri, 16 Aug 2019 18:23:32 +0100 Subject: [PATCH 04/10] WAVE: Replace manual tracking of remaining bytes --- .../hul/ois/jhove/module/WaveModule.java | 53 +++++++++---------- 1 file changed, 25 insertions(+), 28 deletions(-) diff --git a/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/WaveModule.java b/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/WaveModule.java index d72359242..5e4f7137c 100644 --- a/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/WaveModule.java +++ b/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/WaveModule.java @@ -134,11 +134,8 @@ public class WaveModule extends ModuleBase { /** AES audio metadata to go into WAVE metadata */ protected AESAudioMetadata _aesMetadata; - /** - * Bytes of the RIFF chunk remaining to be read. - * Value should be treated as unsigned. - */ - protected long bytesRemaining; + /** RIFF size as found in the RIFF chunk header. */ + protected long riffSize; /** Bytes needed to store a file */ protected int _blockAlign; @@ -368,12 +365,10 @@ public int parse(InputStream stream, RepInfo info, int parseIndex) { // Get the length of the Form chunk. This includes all // subsequent form fields and form subchunks, but excludes // the form chunk's header (its ID and the its length). - long riffSize = readUnsignedInt(_dstream); - bytesRemaining = riffSize; + riffSize = readUnsignedInt(_dstream); // Read the RIFF form type String formType = read4Chars(_dstream); - bytesRemaining -= RIFF_FORM_TYPE_LENGTH; if (!"WAVE".equals(formType)) { info.setMessage(new ErrorMessage( MessageConstants.WAVE_HUL_2, @@ -401,9 +396,6 @@ public int parse(InputStream stream, RepInfo info, int parseIndex) { info.setWellFormed(RepInfo.UNDETERMINED); return 0; } - // Adjust the byte count with the new RIFF size - long bytesRead = riffSize - bytesRemaining; - bytesRemaining = extendedRiffSize - bytesRead; } } else { info.setMessage(new ErrorMessage( @@ -414,16 +406,16 @@ public int parse(InputStream stream, RepInfo info, int parseIndex) { } } - while (bytesRemaining > 0) { + while (getBytesRemaining() > 0) { if (!readChunk(info)) { break; } } - if (bytesRemaining > 0) { + if (getBytesRemaining() > 0) { // The file has been truncated or there // remains unexpected chunk data to skip - remainingDataInfo(_dstream, info, bytesRemaining, + remainingDataInfo(_dstream, info, getBytesRemaining(), firstFourChars); } @@ -431,7 +423,7 @@ public int parse(InputStream stream, RepInfo info, int parseIndex) { info.setWellFormed(false); String subMessage = String.format( MessageConstants.WAVE_HUL_3_SUB.getMessage(), - bytesRemaining); + getBytesRemaining()); if (eofe.getMessage() != null) { subMessage += "; " + eofe.getMessage(); } @@ -686,7 +678,7 @@ protected void initParse() { firstSampleOffsetMarked = false; waveCodec = -1; sampleCount = 0; - bytesRemaining = 0; + riffSize = 0; extendedRiffSize = 0; extendedSampleLength = 0; extendedChunkSizes = new HashMap<>(); @@ -729,10 +721,7 @@ protected boolean readChunk(RepInfo info) throws IOException { Chunk chunk = null; ChunkHeader chunkh = new ChunkHeader(this, info); - - long dataRead = _nByte; if (!chunkh.readHeader(_dstream)) { - bytesRemaining -= _nByte - dataRead; return false; } @@ -746,10 +735,8 @@ protected boolean readChunk(RepInfo info) throws IOException { } } - bytesRemaining -= CHUNK_HEADER_LENGTH; - // Check if the chunk size is greater than the RIFF's remaining length - if (Long.compareUnsigned(bytesRemaining, chunkSize) < 0) { + if (Long.compareUnsigned(getBytesRemaining(), chunkSize) < 0) { info.setMessage(new ErrorMessage( MessageConstants.WAVE_HUL_6, _nByte - CHUNK_SIZE_LENGTH)); info.setWellFormed(false); @@ -850,7 +837,7 @@ protected boolean readChunk(RepInfo info) throws IOException { _nByte - CHUNK_HEADER_LENGTH)); } - dataRead = _nByte; + long dataRead = _nByte; if (chunk != null) { if (!chunk.readChunk(info)) { return false; @@ -861,8 +848,6 @@ protected boolean readChunk(RepInfo info) throws IOException { } dataRead = _nByte - dataRead; - bytesRemaining -= dataRead; - if (dataRead < chunkSize) { // The file has been truncated or there // remains unexpected chunk data to skip @@ -871,7 +856,7 @@ protected boolean readChunk(RepInfo info) throws IOException { if ((chunkSize & 1) != 0) { // Must come out to an even byte boundary - bytesRemaining -= skipBytes(_dstream, 1, this); + skipBytes(_dstream, 1, this); } return true; @@ -895,14 +880,12 @@ private void remainingDataInfo(DataInputStream stream, RepInfo info, while (nullData && bytesProcessed < bytesToProcess) { int b = readUnsignedByte(stream, this); if (b != 0) nullData = false; - this.bytesRemaining--; bytesProcessed++; } // Skip any remaining data bytesProcessed += skipBytes(stream, bytesToProcess - bytesProcessed, this); - this.bytesRemaining -= bytesProcessed; info.setMessage(new InfoMessage( MessageConstants.WAVE_HUL_26, @@ -917,6 +900,20 @@ private void remainingDataInfo(DataInputStream stream, RepInfo info, } } + /** Returns the number of RIFF bytes remaining to be read. */ + private long getBytesRemaining() { + + long totalBytes = CHUNK_HEADER_LENGTH; + + if (hasExtendedDataSizes()) { + totalBytes += extendedRiffSize; + } else { + totalBytes += riffSize; + } + + return totalBytes - _nByte; + } + /** Returns the module's AES metadata. */ public AESAudioMetadata getAESMetadata() { return _aesMetadata; From f80d099168a383d6d5fdf1b7921d9d730a89712e Mon Sep 17 00:00:00 2001 From: David Russo Date: Mon, 19 Aug 2019 11:22:07 +0100 Subject: [PATCH 05/10] WAVE: Add test files for better validation coverage --- ...44khz-8bit-mono-chunk-id-above-valid-ascii.wav | Bin 0 -> 54 bytes ...44khz-8bit-mono-chunk-id-below-valid-ascii.wav | Bin 0 -> 54 bytes ...cm-44khz-8bit-mono-chunk-id-embedded-space.wav | Bin 56 -> 54 bytes ...pcm-44khz-8bit-mono-chunk-id-leading-space.wav | Bin 56 -> 54 bytes ...-44khz-8bit-mono-chunk-id-non-alphanumeric.wav | Bin 56 -> 0 bytes ...ono-chunk-size-larger-than-bytes-remaining.wav | Bin 0 -> 46 bytes ...z-8bit-mono-fmt-chunk-2-unrecognized-bytes.wav | Bin 0 -> 50 bytes ...-non-chunk-data-before-riff-end-of-2-bytes.wav | Bin 0 -> 48 bytes ...chunk-data-before-riff-end-of-2-null-bytes.wav | Bin 0 -> 48 bytes ...bit-mono-truncated-final-chunk-by-2-bytes.wav} | Bin ...bit-mono-truncated-inner-chunk-by-2-bytes.wav} | Bin ...44khz-8bit-mono-truncated-riff-by-2-bytes.wav} | Bin .../wf-pcm-44khz-8bit-mono-unknown-chunk.wav | Bin 0 -> 54 bytes 13 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 test-root/corpora/errors/modules/WAVE-hul/wf-pcm-44khz-8bit-mono-chunk-id-above-valid-ascii.wav create mode 100644 test-root/corpora/errors/modules/WAVE-hul/wf-pcm-44khz-8bit-mono-chunk-id-below-valid-ascii.wav delete mode 100644 test-root/corpora/errors/modules/WAVE-hul/wf-pcm-44khz-8bit-mono-chunk-id-non-alphanumeric.wav create mode 100644 test-root/corpora/errors/modules/WAVE-hul/wf-pcm-44khz-8bit-mono-chunk-size-larger-than-bytes-remaining.wav create mode 100644 test-root/corpora/errors/modules/WAVE-hul/wf-pcm-44khz-8bit-mono-fmt-chunk-2-unrecognized-bytes.wav create mode 100644 test-root/corpora/errors/modules/WAVE-hul/wf-pcm-44khz-8bit-mono-non-chunk-data-before-riff-end-of-2-bytes.wav create mode 100644 test-root/corpora/errors/modules/WAVE-hul/wf-pcm-44khz-8bit-mono-non-chunk-data-before-riff-end-of-2-null-bytes.wav rename test-root/corpora/errors/modules/WAVE-hul/{wf-pcm-44khz-8bit-mono-truncated-final-chunk.wav => wf-pcm-44khz-8bit-mono-truncated-final-chunk-by-2-bytes.wav} (100%) rename test-root/corpora/errors/modules/WAVE-hul/{wf-pcm-44khz-8bit-mono-truncated-inner-chunk.wav => wf-pcm-44khz-8bit-mono-truncated-inner-chunk-by-2-bytes.wav} (100%) rename test-root/corpora/errors/modules/WAVE-hul/{wf-pcm-44khz-8bit-mono-truncated-riff.wav => wf-pcm-44khz-8bit-mono-truncated-riff-by-2-bytes.wav} (100%) create mode 100644 test-root/corpora/examples/modules/WAVE-hul/wf-pcm-44khz-8bit-mono-unknown-chunk.wav diff --git a/test-root/corpora/errors/modules/WAVE-hul/wf-pcm-44khz-8bit-mono-chunk-id-above-valid-ascii.wav b/test-root/corpora/errors/modules/WAVE-hul/wf-pcm-44khz-8bit-mono-chunk-id-above-valid-ascii.wav new file mode 100644 index 0000000000000000000000000000000000000000..211588deb713acae4199451c675b3c4a5a42a76a GIT binary patch literal 54 zcmWIYbaT^VU|VXUf01{IP AOaK4? literal 0 HcmV?d00001 diff --git a/test-root/corpora/errors/modules/WAVE-hul/wf-pcm-44khz-8bit-mono-chunk-id-below-valid-ascii.wav b/test-root/corpora/errors/modules/WAVE-hul/wf-pcm-44khz-8bit-mono-chunk-id-below-valid-ascii.wav new file mode 100644 index 0000000000000000000000000000000000000000..8270921f99e767e2b95f78a8795c732ee66cbbe0 GIT binary patch literal 54 zcmWIYbaT^VU|;M1& literal 0 HcmV?d00001 diff --git a/test-root/corpora/errors/modules/WAVE-hul/wf-pcm-44khz-8bit-mono-chunk-id-embedded-space.wav b/test-root/corpora/errors/modules/WAVE-hul/wf-pcm-44khz-8bit-mono-chunk-id-embedded-space.wav index 6df0d3dbf62e603cb1b2265cbaecd049cdfce611..b79444644372924e869325e3f4b06beaad3a2588 100644 GIT binary patch delta 30 kcmcC8V-50jbJLs1Dle3hSdz%dz`)SJ;N+;_0%R}%0A%t7k^lez delta 32 icmXrBU=8wgb2FI8Dlg)s;ON5000JqAC5a$b0|NkLR|S^< diff --git a/test-root/corpora/errors/modules/WAVE-hul/wf-pcm-44khz-8bit-mono-chunk-id-leading-space.wav b/test-root/corpora/errors/modules/WAVE-hul/wf-pcm-44khz-8bit-mono-chunk-id-leading-space.wav index c1d9fc5ef68be0d932a12b5135cb78b947e5313a..eb4e5ed089b8f3335d267a43d7d1c3ab29951363 100644 GIT binary patch delta 30 kcmcC8V-50jbJLs1Dle3hSdz%dz`)SJpy1@_0%R}%0A#NPk^lez delta 32 icmXrBU=8wgb2FI8Dleko_ diff --git a/test-root/corpora/errors/modules/WAVE-hul/wf-pcm-44khz-8bit-mono-chunk-size-larger-than-bytes-remaining.wav b/test-root/corpora/errors/modules/WAVE-hul/wf-pcm-44khz-8bit-mono-chunk-size-larger-than-bytes-remaining.wav new file mode 100644 index 0000000000000000000000000000000000000000..093d30ae211df8dac0be683584b7c45c91d4957c GIT binary patch literal 46 tcmWIYbaPW literal 0 HcmV?d00001 From d03cd53daff685f867aa5a96738a411b2173b3cc Mon Sep 17 00:00:00 2001 From: David Russo Date: Tue, 17 Sep 2019 15:00:01 +0100 Subject: [PATCH 06/10] WAVE: Allow DS64 Table Length field to be optional Also stripped example wave files of unnecessary data. --- .../ois/jhove/module/wave/DataSize64Chunk.java | 17 +++++++++++------ ...-pcm-44khz-8bit-mono-ds64-chunk-missing.wav | Bin 70 -> 46 bytes .../rf64-alaw-44khz-8bit-mono-minimal.wav | Bin 106 -> 0 bytes .../WAVE-hul/rf64-alaw-44khz-8bit-mono.wav | Bin 0 -> 102 bytes .../rf64-float-44khz-32bit-mono-minimal.wav | Bin 108 -> 0 bytes .../WAVE-hul/rf64-float-44khz-32bit-mono.wav | Bin 0 -> 104 bytes .../rf64-float-44khz-64bit-mono-minimal.wav | Bin 112 -> 0 bytes .../WAVE-hul/rf64-float-44khz-64bit-mono.wav | Bin 0 -> 108 bytes ...-44khz-8bit-mono-ds64-chunk-unnecessary.wav | Bin 106 -> 78 bytes ...-44khz-8bit-mono-ds64-with-table-length.wav | Bin 0 -> 82 bytes .../rf64-pcm-44khz-8bit-mono-minimal.wav | Bin 106 -> 76 bytes .../WAVE-hul/rf64-pcm-44khz-8bit-mono.wav | Bin 0 -> 78 bytes .../rf64-ulaw-44khz-8bit-mono-minimal.wav | Bin 106 -> 0 bytes .../WAVE-hul/rf64-ulaw-44khz-8bit-mono.wav | Bin 0 -> 102 bytes ...-minimal.wav => wf-pcm-44khz-8bit-mono.wav} | Bin ...minimal.wav => wfe-pcm-44khz-8bit-mono.wav} | Bin 16 files changed, 11 insertions(+), 6 deletions(-) delete mode 100644 test-root/corpora/examples/modules/WAVE-hul/rf64-alaw-44khz-8bit-mono-minimal.wav create mode 100644 test-root/corpora/examples/modules/WAVE-hul/rf64-alaw-44khz-8bit-mono.wav delete mode 100644 test-root/corpora/examples/modules/WAVE-hul/rf64-float-44khz-32bit-mono-minimal.wav create mode 100644 test-root/corpora/examples/modules/WAVE-hul/rf64-float-44khz-32bit-mono.wav delete mode 100644 test-root/corpora/examples/modules/WAVE-hul/rf64-float-44khz-64bit-mono-minimal.wav create mode 100644 test-root/corpora/examples/modules/WAVE-hul/rf64-float-44khz-64bit-mono.wav create mode 100644 test-root/corpora/examples/modules/WAVE-hul/rf64-pcm-44khz-8bit-mono-ds64-with-table-length.wav create mode 100644 test-root/corpora/examples/modules/WAVE-hul/rf64-pcm-44khz-8bit-mono.wav delete mode 100644 test-root/corpora/examples/modules/WAVE-hul/rf64-ulaw-44khz-8bit-mono-minimal.wav create mode 100644 test-root/corpora/examples/modules/WAVE-hul/rf64-ulaw-44khz-8bit-mono.wav rename test-root/corpora/examples/modules/WAVE-hul/{wf-pcm-44khz-8bit-mono-minimal.wav => wf-pcm-44khz-8bit-mono.wav} (100%) rename test-root/corpora/examples/modules/WAVE-hul/{wfe-pcm-44khz-8bit-mono-minimal.wav => wfe-pcm-44khz-8bit-mono.wav} (100%) diff --git a/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/wave/DataSize64Chunk.java b/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/wave/DataSize64Chunk.java index f85a963f1..73b62c4cd 100644 --- a/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/wave/DataSize64Chunk.java +++ b/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/wave/DataSize64Chunk.java @@ -19,6 +19,9 @@ */ public class DataSize64Chunk extends Chunk { + /** The combined length of all mandatory fields. */ + private final static int MINIMUM_CHUNK_LENGTH = 24; + /** * Constructor. * @@ -48,16 +51,18 @@ public boolean readChunk(RepInfo info) throws IOException { module.setExtendedRiffSize(riffSize); long dataSize = module.readSignedLong(_dstream); - module.addExtendedChunkSize("data", Long.valueOf(dataSize)); + module.addExtendedChunkSize("data", dataSize); long sampleCount = module.readSignedLong(_dstream); module.setExtendedSampleLength(sampleCount); - long tableSize = module.readUnsignedInt(_dstream); - for (int i = 0; i < tableSize; i++) { - String chunkId = module.read4Chars(_dstream); - long chunkSize = module.readSignedLong(_dstream); - module.addExtendedChunkSize(chunkId, Long.valueOf(chunkSize)); + if (chunkSize > MINIMUM_CHUNK_LENGTH) { + long tableSize = module.readUnsignedInt(_dstream); + for (int i = 0; i < tableSize; i++) { + String chunkId = module.read4Chars(_dstream); + long chunkSize = module.readSignedLong(_dstream); + module.addExtendedChunkSize(chunkId, chunkSize); + } } return true; diff --git a/test-root/corpora/errors/modules/WAVE-hul/rf64-pcm-44khz-8bit-mono-ds64-chunk-missing.wav b/test-root/corpora/errors/modules/WAVE-hul/rf64-pcm-44khz-8bit-mono-ds64-chunk-missing.wav index 9c19bb29d6b713b44e9acad0a936b64f572c8fa1..b2bbcfaacc01fc15e726fde103255304d0487e79 100644 GIT binary patch literal 46 tcmWG?Gc!?RU|OWN=x-0LF|A91LPW%mNf=1Y!mT0fq(!hE)s} OvkOxaOAFW*Mh2HP3}DR2z`-B} f#4JE@Hjp9)0fq(!hE)s}vkOxaOA{4h%Nhm-fsIT+ ibqWk(KnzmP3{u1(z|g?Ju!_NAc410lNg~L6kSG9-^%boE diff --git a/test-root/corpora/examples/modules/WAVE-hul/rf64-float-44khz-32bit-mono.wav b/test-root/corpora/examples/modules/WAVE-hul/rf64-float-44khz-32bit-mono.wav new file mode 100644 index 0000000000000000000000000000000000000000..fa2bb1e5d0d957a66c7fd6670887d88efbbf2407 GIT binary patch literal 104 zcmWG?Gc)-Q1mTWht|`T4CK3z`3<*FC0xS@Ufe}il<(4RD0NMZkGcvfWVPFv0$OKfQ gz#s<1Ahpb3bpi|x3=FFnEM^y`B$gzC%mxVq0BmIyr2qf` literal 0 HcmV?d00001 diff --git a/test-root/corpora/examples/modules/WAVE-hul/rf64-float-44khz-64bit-mono-minimal.wav b/test-root/corpora/examples/modules/WAVE-hul/rf64-float-44khz-64bit-mono-minimal.wav deleted file mode 100644 index 1aa499962aba5d9b377d7124da003113f1d522af..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 112 zcmWG?Gc)-Q1mTWht|`T4CNc~R3>iQS0vr&Efe}iBsI=S?1q~qm?>{4h%Nhm-g(Oy> kItKHZzd`vO##ey$l$Vu0gM?LI2ckAOAHZzd{vO#GC0*nv}PJ_5FW*Mh2HP3}DR2z`-B} d#4JE@h#mok1_p*z3>LEsQxZ!OLFP9w003iZ79aos diff --git a/test-root/corpora/examples/modules/WAVE-hul/rf64-pcm-44khz-8bit-mono.wav b/test-root/corpora/examples/modules/WAVE-hul/rf64-pcm-44khz-8bit-mono.wav new file mode 100644 index 0000000000000000000000000000000000000000..4320623a3adfae9c79c5590c0e7a36a60c78a5c2 GIT binary patch literal 78 zcmWG?Gc)-Q1mTWht|`T4CK3z`3~oRS0*nv}PN(ITC50|!G&Vo4&% Hj0Oe(okS5! literal 0 HcmV?d00001 diff --git a/test-root/corpora/examples/modules/WAVE-hul/rf64-ulaw-44khz-8bit-mono-minimal.wav b/test-root/corpora/examples/modules/WAVE-hul/rf64-ulaw-44khz-8bit-mono-minimal.wav deleted file mode 100644 index de4bea47b654770e1c62bbaac7f63372fd520bfe..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 106 zcmWG?Gc)-Q1mTWht|`T4CNc~R3`sx?0*nv}PJ_5FW*Mh2HP3}DR2z`-B} f#4JE@c90?l0fq(!hE)s}vkOxaOA Date: Wed, 16 Oct 2019 16:08:18 +0100 Subject: [PATCH 07/10] WAVE: Demote WAVE-HUL-15 from Error to Informational Like unrecognized chunks, unrecognized list types are allowed but should be skipped, so this message is now informational. This change also allows file processing to continue after finding an unknown list, instead of aborting prematurely. --- .../hul/ois/jhove/module/wave/ListInfoChunk.java | 10 ++++++---- .../jhove/module/wave/ErrorMessages.properties | 2 +- .../wf-pcm-44khz-8bit-mono-unknown-chunk.wav | Bin 54 -> 54 bytes .../wf-pcm-44khz-8bit-mono-unknown-list.wav | Bin 0 -> 64 bytes 4 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 test-root/corpora/examples/modules/WAVE-hul/wf-pcm-44khz-8bit-mono-unknown-list.wav diff --git a/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/wave/ListInfoChunk.java b/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/wave/ListInfoChunk.java index 6582daa05..7013fad44 100644 --- a/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/wave/ListInfoChunk.java +++ b/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/wave/ListInfoChunk.java @@ -63,13 +63,15 @@ public boolean readChunk(RepInfo info) throws IOException { } else if ("adtl".equals(typeID)) { return readAdtlChunk(info); } else { + // Skip unrecognized list types JhoveMessage message = JhoveMessages.getMessageInstance( MessageConstants.WAVE_HUL_15.getId(), String.format( - MessageConstants.WAVE_HUL_15.getMessage(), typeID)); - info.setMessage(new ErrorMessage( + MessageConstants.WAVE_HUL_15.getMessage(), + "\"" + typeID + "\"")); + info.setMessage(new InfoMessage( message, _module.getNByte() - TYPE_LENGTH)); - info.setWellFormed(false); - return false; + _module.skipBytes(_dstream, bytesLeft, _module); + return true; } } diff --git a/jhove-modules/wave-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/wave/ErrorMessages.properties b/jhove-modules/wave-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/wave/ErrorMessages.properties index 0874724b0..57d3986ad 100644 --- a/jhove-modules/wave-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/wave/ErrorMessages.properties +++ b/jhove-modules/wave-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/wave/ErrorMessages.properties @@ -14,7 +14,7 @@ WAVE-HUL-11 = Exif User Comment chunk is too short WAVE-HUL-12 = Incorrect length for Exif Version chunk WAVE-HUL-13 = SAXException in reading Link chunk WAVE-HUL-14 = ParserConfigurationException in reading Link chunk -WAVE-HUL-15 = List chunk contains unknown type: %s +WAVE-HUL-15 = Ignored unrecognized list type: %s WAVE-HUL-16 = Ignored Info List chunk of type: %s WAVE-HUL-17 = Ignored Associated Data chunk of type: %s WAVE-HUL-18 = Ignored Associated Data chunk of type: %s diff --git a/test-root/corpora/examples/modules/WAVE-hul/wf-pcm-44khz-8bit-mono-unknown-chunk.wav b/test-root/corpora/examples/modules/WAVE-hul/wf-pcm-44khz-8bit-mono-unknown-chunk.wav index 3d633502f69ffa0f668ee5dea4278e1b31287030..710eadcf2e621486706a727113bb2a2d2ccb7286 100644 GIT binary patch delta 12 RcmXpro1o9`=k3P;1OO4w0vZ4S delta 12 RcmXpro1o9`9qz{f1OO5O0wVwb diff --git a/test-root/corpora/examples/modules/WAVE-hul/wf-pcm-44khz-8bit-mono-unknown-list.wav b/test-root/corpora/examples/modules/WAVE-hul/wf-pcm-44khz-8bit-mono-unknown-list.wav new file mode 100644 index 0000000000000000000000000000000000000000..bd97f38569f7102a260ae2027fa2fe6b56b20008 GIT binary patch literal 64 zcmWIYbaS&{U| Date: Wed, 16 Oct 2019 19:22:05 +0100 Subject: [PATCH 08/10] IFF: Consolidate chunk properties into Chunk class This moves constants for chunk properties such as ID and size field lengths into the Chunk class, and also adds chunk offset information for all chunks. --- .../hul/ois/jhove/module/iff/Chunk.java | 17 ++++++++++--- .../hul/ois/jhove/module/iff/ChunkHeader.java | 24 +++++++++++++------ .../hul/ois/jhove/module/WaveModule.java | 20 +++++----------- .../ois/jhove/module/wave/ListInfoChunk.java | 3 +-- 4 files changed, 38 insertions(+), 26 deletions(-) diff --git a/jhove-modules/aiff-hul/src/main/java/edu/harvard/hul/ois/jhove/module/iff/Chunk.java b/jhove-modules/aiff-hul/src/main/java/edu/harvard/hul/ois/jhove/module/iff/Chunk.java index fc155f6e1..3d04d7934 100644 --- a/jhove-modules/aiff-hul/src/main/java/edu/harvard/hul/ois/jhove/module/iff/Chunk.java +++ b/jhove-modules/aiff-hul/src/main/java/edu/harvard/hul/ois/jhove/module/iff/Chunk.java @@ -18,10 +18,20 @@ */ public abstract class Chunk { + /** Length of chunk ID fields in bytes */ + public static final int ID_LENGTH = 4; + + /** Length of chunk size fields in bytes */ + public static final int SIZE_LENGTH = 4; + + /** Length of chunk headers in bytes */ + public static final int HEADER_LENGTH = ID_LENGTH + SIZE_LENGTH; + protected ModuleBase _module; - protected long chunkSize; - protected long bytesLeft; protected DataInputStream _dstream; + protected long bytesLeft; + protected long chunkSize; + protected long chunkOffset; /** * Class constructor. @@ -33,9 +43,10 @@ public abstract class Chunk { public Chunk(ModuleBase module, ChunkHeader hdr, DataInputStream dstrm) { _module = module; + _dstream = dstrm; chunkSize = hdr.getSize(); + chunkOffset = hdr.getOffset(); bytesLeft = chunkSize; - _dstream = dstrm; } /** diff --git a/jhove-modules/aiff-hul/src/main/java/edu/harvard/hul/ois/jhove/module/iff/ChunkHeader.java b/jhove-modules/aiff-hul/src/main/java/edu/harvard/hul/ois/jhove/module/iff/ChunkHeader.java index 982a1f18c..2dff58060 100644 --- a/jhove-modules/aiff-hul/src/main/java/edu/harvard/hul/ois/jhove/module/iff/ChunkHeader.java +++ b/jhove-modules/aiff-hul/src/main/java/edu/harvard/hul/ois/jhove/module/iff/ChunkHeader.java @@ -16,11 +16,10 @@ */ public class ChunkHeader { - private static final int CHUNK_ID_LENGTH = 4; - private ModuleBase _module; private RepInfo _repInfo; private String _chunkId; // Four-character ID of the chunk + private long _offset; // Offset from the beginning of file private long _size; // This does not include the 8 bytes of header /** @@ -42,17 +41,22 @@ public ChunkHeader(ModuleBase module, RepInfo info) */ public boolean readHeader(DataInputStream dstrm) throws IOException { + final int LOWEST_PRINTABLE_ASCII = 32; + final int HIGHEST_PRINTABLE_ASCII = 126; + + _offset = _module.getNByte(); + boolean idBeginsWithSpace = false; boolean spacePrecedesPrintableCharacters = false; - StringBuilder id = new StringBuilder(CHUNK_ID_LENGTH); + StringBuilder id = new StringBuilder(Chunk.ID_LENGTH); - for (int i = 0; i < CHUNK_ID_LENGTH; i++) { + for (int i = 0; i < Chunk.ID_LENGTH; i++) { boolean printableCharacter = false; int ch = ModuleBase.readUnsignedByte(dstrm, _module); // Characters should be in the printable ASCII range - if (ch < 32 || ch > 126) { + if (ch < LOWEST_PRINTABLE_ASCII || ch > HIGHEST_PRINTABLE_ASCII) { _repInfo.setMessage(new ErrorMessage( MessageConstants.IFF_HUL_1, String.format( @@ -84,7 +88,7 @@ public boolean readHeader(DataInputStream dstrm) throws IOException if (spacePrecedesPrintableCharacters) { _repInfo.setMessage(new ErrorMessage( MessageConstants.IFF_HUL_2, "\"" + _chunkId + "\"", - _module.getNByte() - CHUNK_ID_LENGTH)); + _module.getNByte() - Chunk.ID_LENGTH)); _repInfo.setValid(false); } @@ -112,9 +116,15 @@ public void setSize(long size) _size = size; } - /** Returns the chunk size (excluding the first 8 bytes) */ + /** Returns the chunk size, which excludes the length of the header. */ public long getSize() { return _size; } + + /** Returns the chunk offset in bytes from the beginning of file. */ + public long getOffset() + { + return _offset; + } } diff --git a/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/WaveModule.java b/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/WaveModule.java index 5e4f7137c..7bda4497f 100644 --- a/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/WaveModule.java +++ b/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/WaveModule.java @@ -98,12 +98,6 @@ public class WaveModule extends ModuleBase { /** Length of the RIFF form type field in bytes */ private static final int RIFF_FORM_TYPE_LENGTH = 4; - /** Length of chunk headers in bytes */ - private static final int CHUNK_HEADER_LENGTH = 8; - - /** Length of chunk size fields in bytes */ - private static final int CHUNK_SIZE_LENGTH = 4; - /** Value indicating a required 64-bit data size lookup */ public static final long LOOKUP_EXTENDED_DATA_SIZE = 0xFFFFFFFFL; @@ -400,7 +394,7 @@ public int parse(InputStream stream, RepInfo info, int parseIndex) { } else { info.setMessage(new ErrorMessage( MessageConstants.WAVE_HUL_23, - CHUNK_HEADER_LENGTH + RIFF_FORM_TYPE_LENGTH)); + Chunk.HEADER_LENGTH + RIFF_FORM_TYPE_LENGTH)); info.setWellFormed(false); return 0; } @@ -738,7 +732,7 @@ protected boolean readChunk(RepInfo info) throws IOException { // Check if the chunk size is greater than the RIFF's remaining length if (Long.compareUnsigned(getBytesRemaining(), chunkSize) < 0) { info.setMessage(new ErrorMessage( - MessageConstants.WAVE_HUL_6, _nByte - CHUNK_SIZE_LENGTH)); + MessageConstants.WAVE_HUL_6, _nByte - Chunk.SIZE_LENGTH)); info.setWellFormed(false); return false; } @@ -752,8 +746,7 @@ protected boolean readChunk(RepInfo info) throws IOException { } else if ("data".equals(chunkId)) { if (!formatChunkSeen) { info.setMessage(new ErrorMessage( - MessageConstants.WAVE_HUL_25, - _nByte - CHUNK_HEADER_LENGTH)); + MessageConstants.WAVE_HUL_25, chunkh.getOffset())); info.setValid(false); } if (dataChunkSeen) { @@ -833,8 +826,7 @@ protected boolean readChunk(RepInfo info) throws IOException { MessageConstants.WAVE_HUL_7.getId(), String.format(MessageConstants.WAVE_HUL_7.getMessage(), "\"" + chunkId + "\"")); - info.setMessage(new InfoMessage(message, - _nByte - CHUNK_HEADER_LENGTH)); + info.setMessage(new InfoMessage(message, chunkh.getOffset())); } long dataRead = _nByte; @@ -903,7 +895,7 @@ private void remainingDataInfo(DataInputStream stream, RepInfo info, /** Returns the number of RIFF bytes remaining to be read. */ private long getBytesRemaining() { - long totalBytes = CHUNK_HEADER_LENGTH; + long totalBytes = Chunk.HEADER_LENGTH; if (hasExtendedDataSizes()) { totalBytes += extendedRiffSize; @@ -925,7 +917,7 @@ protected void dupChunkError(RepInfo info, String chunkName) { MessageConstants.WAVE_HUL_8.getId(), String.format( MessageConstants.WAVE_HUL_8.getMessage(), chunkName)); info.setMessage(new ErrorMessage( - message, _nByte - CHUNK_HEADER_LENGTH)); + message, _nByte - Chunk.HEADER_LENGTH)); info.setValid(false); } diff --git a/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/wave/ListInfoChunk.java b/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/wave/ListInfoChunk.java index 7013fad44..810d09b3b 100644 --- a/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/wave/ListInfoChunk.java +++ b/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/wave/ListInfoChunk.java @@ -68,8 +68,7 @@ public boolean readChunk(RepInfo info) throws IOException { MessageConstants.WAVE_HUL_15.getId(), String.format( MessageConstants.WAVE_HUL_15.getMessage(), "\"" + typeID + "\"")); - info.setMessage(new InfoMessage( - message, _module.getNByte() - TYPE_LENGTH)); + info.setMessage(new InfoMessage(message, chunkOffset)); _module.skipBytes(_dstream, bytesLeft, _module); return true; } From f9cada9179a5ab75dd128f2df36e9630649f34b4 Mon Sep 17 00:00:00 2001 From: David Russo Date: Fri, 18 Oct 2019 10:53:46 +0100 Subject: [PATCH 09/10] IFF & WAVE: Move remaining strings into resource files - Retired WAVE-HUL-16 which was a part of previously pruned dead code. - All chunk names are now surrounded by quotation marks to improve visibility of leading and trailing spaces and have been moved into translatable resource files. - Improved accuracy of WAVE messages. --- .../hul/ois/jhove/module/iff/ChunkHeader.java | 16 +++++++++---- .../jhove/module/iff/ErrorMessages.properties | 2 +- .../hul/ois/jhove/module/WaveModule.java | 9 ++++--- .../ois/jhove/module/wave/ListInfoChunk.java | 3 +-- .../jhove/module/wave/MessageConstants.java | 5 ++-- .../module/wave/ErrorMessages.properties | 24 +++++++++---------- 6 files changed, 32 insertions(+), 27 deletions(-) diff --git a/jhove-modules/aiff-hul/src/main/java/edu/harvard/hul/ois/jhove/module/iff/ChunkHeader.java b/jhove-modules/aiff-hul/src/main/java/edu/harvard/hul/ois/jhove/module/iff/ChunkHeader.java index 2dff58060..187a237d5 100644 --- a/jhove-modules/aiff-hul/src/main/java/edu/harvard/hul/ois/jhove/module/iff/ChunkHeader.java +++ b/jhove-modules/aiff-hul/src/main/java/edu/harvard/hul/ois/jhove/module/iff/ChunkHeader.java @@ -6,8 +6,14 @@ package edu.harvard.hul.ois.jhove.module.iff; -import edu.harvard.hul.ois.jhove.*; -import java.io.*; +import edu.harvard.hul.ois.jhove.ErrorMessage; +import edu.harvard.hul.ois.jhove.ModuleBase; +import edu.harvard.hul.ois.jhove.RepInfo; +import edu.harvard.hul.ois.jhove.messages.JhoveMessage; +import edu.harvard.hul.ois.jhove.messages.JhoveMessages; + +import java.io.DataInputStream; +import java.io.IOException; /** * This class encapsulates an IFF/AIFF chunk header. @@ -86,8 +92,10 @@ public boolean readHeader(DataInputStream dstrm) throws IOException // Spaces should not precede printable characters if (spacePrecedesPrintableCharacters) { - _repInfo.setMessage(new ErrorMessage( - MessageConstants.IFF_HUL_2, "\"" + _chunkId + "\"", + JhoveMessage message = JhoveMessages.getMessageInstance( + MessageConstants.IFF_HUL_2.getId(), String.format( + MessageConstants.IFF_HUL_2.getMessage(), _chunkId)); + _repInfo.setMessage(new ErrorMessage(message, _module.getNByte() - Chunk.ID_LENGTH)); _repInfo.setValid(false); } diff --git a/jhove-modules/aiff-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/iff/ErrorMessages.properties b/jhove-modules/aiff-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/iff/ErrorMessages.properties index 6f261ee95..ed889b5ee 100644 --- a/jhove-modules/aiff-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/iff/ErrorMessages.properties +++ b/jhove-modules/aiff-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/iff/ErrorMessages.properties @@ -1,3 +1,3 @@ IFF-HUL-1 = Chunk ID character outside printable ASCII range IFF-HUL-1-SUB = Character = 0x%02X -IFF-HUL-2 = Chunk ID contains space before printable characters \ No newline at end of file +IFF-HUL-2 = Chunk ID contains space before printable characters: "%s" \ No newline at end of file diff --git a/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/WaveModule.java b/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/WaveModule.java index 7bda4497f..24a6460fe 100644 --- a/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/WaveModule.java +++ b/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/WaveModule.java @@ -825,7 +825,7 @@ protected boolean readChunk(RepInfo info) throws IOException { JhoveMessage message = JhoveMessages.getMessageInstance( MessageConstants.WAVE_HUL_7.getId(), String.format(MessageConstants.WAVE_HUL_7.getMessage(), - "\"" + chunkId + "\"")); + chunkId)); info.setMessage(new InfoMessage(message, chunkh.getOffset())); } @@ -882,13 +882,12 @@ private void remainingDataInfo(DataInputStream stream, RepInfo info, info.setMessage(new InfoMessage( MessageConstants.WAVE_HUL_26, String.format(MessageConstants.WAVE_HUL_26_SUB.getMessage(), - "\"" + chunkId + "\"", bytesProcessed, nullData), + chunkId, bytesProcessed, nullData), _nByte - bytesProcessed)); } else { - throw new EOFException( - MessageConstants.SUB_MESS_TRUNCATED_CHUNK - + "\"" + chunkId + "\""); + throw new EOFException(String.format( + MessageConstants.WAVE_HUL_3_SUB_2.getMessage(), chunkId)); } } diff --git a/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/wave/ListInfoChunk.java b/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/wave/ListInfoChunk.java index 810d09b3b..63f13f601 100644 --- a/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/wave/ListInfoChunk.java +++ b/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/wave/ListInfoChunk.java @@ -66,8 +66,7 @@ public boolean readChunk(RepInfo info) throws IOException { // Skip unrecognized list types JhoveMessage message = JhoveMessages.getMessageInstance( MessageConstants.WAVE_HUL_15.getId(), String.format( - MessageConstants.WAVE_HUL_15.getMessage(), - "\"" + typeID + "\"")); + MessageConstants.WAVE_HUL_15.getMessage(), typeID)); info.setMessage(new InfoMessage(message, chunkOffset)); _module.skipBytes(_dstream, bytesLeft, _module); return true; diff --git a/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/wave/MessageConstants.java b/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/wave/MessageConstants.java index cf4c06711..e1520bd2f 100644 --- a/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/wave/MessageConstants.java +++ b/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/wave/MessageConstants.java @@ -38,12 +38,11 @@ public enum MessageConstants { public static final JhoveMessageFactory messageFactory = JhoveMessages .getInstance("edu.harvard.hul.ois.jhove.module.wave.ErrorMessages"); - public static final String SUB_MESS_TRUNCATED_CHUNK = "Truncated chunk = "; - public static final JhoveMessage WAVE_HUL_1 = messageFactory.getMessage("WAVE-HUL-1"); public static final JhoveMessage WAVE_HUL_2 = messageFactory.getMessage("WAVE-HUL-2"); public static final JhoveMessage WAVE_HUL_3 = messageFactory.getMessage("WAVE-HUL-3"); public static final JhoveMessage WAVE_HUL_3_SUB = messageFactory.getMessage("WAVE-HUL-3-SUB"); + public static final JhoveMessage WAVE_HUL_3_SUB_2 = messageFactory.getMessage("WAVE-HUL-3-SUB-2"); public static final JhoveMessage WAVE_HUL_4 = messageFactory.getMessage("WAVE-HUL-4"); public static final JhoveMessage WAVE_HUL_5 = messageFactory.getMessage("WAVE-HUL-5"); public static final JhoveMessage WAVE_HUL_6 = messageFactory.getMessage("WAVE-HUL-6"); @@ -57,7 +56,7 @@ public enum MessageConstants { public static final JhoveMessage WAVE_HUL_13 = messageFactory.getMessage("WAVE-HUL-13"); public static final JhoveMessage WAVE_HUL_14 = messageFactory.getMessage("WAVE-HUL-14"); public static final JhoveMessage WAVE_HUL_15 = messageFactory.getMessage("WAVE-HUL-15"); - public static final JhoveMessage WAVE_HUL_16 = messageFactory.getMessage("WAVE-HUL-16"); +// public static final JhoveMessage WAVE_HUL_16 = RETIRED public static final JhoveMessage WAVE_HUL_17 = messageFactory.getMessage("WAVE-HUL-17"); public static final JhoveMessage WAVE_HUL_18 = messageFactory.getMessage("WAVE-HUL-18"); public static final JhoveMessage WAVE_HUL_19 = messageFactory.getMessage("WAVE-HUL-19"); diff --git a/jhove-modules/wave-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/wave/ErrorMessages.properties b/jhove-modules/wave-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/wave/ErrorMessages.properties index 57d3986ad..8cfe3781e 100644 --- a/jhove-modules/wave-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/wave/ErrorMessages.properties +++ b/jhove-modules/wave-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/wave/ErrorMessages.properties @@ -2,29 +2,29 @@ WAVE-HUL-1 = File does not start with RIFF header WAVE-HUL-2 = Form type in RIFF header is not WAVE WAVE-HUL-3 = Unexpected end of file WAVE-HUL-3-SUB = Bytes missing = %s +WAVE-HUL-3-SUB-2 = Truncated chunk = "%s" WAVE-HUL-4 = Exception reading file: %s WAVE-HUL-5 = No Format chunk found WAVE-HUL-6 = Invalid chunk size -WAVE-HUL-7 = Ignored unrecognized chunk: %s -WAVE-HUL-8 = Duplicate chunks found for type: %s +WAVE-HUL-7 = Ignored unrecognized chunk: "%s" +WAVE-HUL-8 = Multiple chunks found of type: "%s" WAVE-HUL-9 = Unknown list type in Associated Data List chunk -WAVE-HUL-9-SUB = Type = %s -WAVE-HUL-10 = Ignored Associated Data chunk of type: %s +WAVE-HUL-9-SUB = Type = "%s" +WAVE-HUL-10 = Ignored Associated Data List chunk: "%s" WAVE-HUL-11 = Exif User Comment chunk is too short WAVE-HUL-12 = Incorrect length for Exif Version chunk -WAVE-HUL-13 = SAXException in reading Link chunk +WAVE-HUL-13 = SAXException while reading Link chunk WAVE-HUL-14 = ParserConfigurationException in reading Link chunk -WAVE-HUL-15 = Ignored unrecognized list type: %s -WAVE-HUL-16 = Ignored Info List chunk of type: %s -WAVE-HUL-17 = Ignored Associated Data chunk of type: %s -WAVE-HUL-18 = Ignored Associated Data chunk of type: %s -WAVE-HUL-19 = Ignored Info List chunk of type: %s +WAVE-HUL-15 = Ignored unrecognized list type: "%s" +WAVE-HUL-17 = Ignored Exif List chunk: "%s" +WAVE-HUL-18 = Ignored Associated Data List chunk: "%s" +WAVE-HUL-19 = Ignored Info List chunk: "%s" WAVE-HUL-20 = Invalid format value in Peak Envelope chunk WAVE-HUL-21 = Invalid pointsPerValue in Peak Envelope chunk -WAVE-HUL-22 = File too large to validate +WAVE-HUL-22 = File too large to process WAVE-HUL-23 = Data Size 64 chunk not in required location WAVE-HUL-24 = No Data chunk found WAVE-HUL-25 = Data chunk appears before Format chunk WAVE-HUL-26 = Ignored unrecognized data remaining in chunk -WAVE-HUL-26-SUB = Chunk = %s; Bytes = %s; Null = %s +WAVE-HUL-26-SUB = Chunk = "%s"; Bytes = %s; Null = %s WAVE-HUL-27 = Unrecognized BWF version: %s From 4d95d893040a755fb933474a841f0b4225915b09 Mon Sep 17 00:00:00 2001 From: Carl Wilson Date: Tue, 10 Dec 2019 01:24:26 +0000 Subject: [PATCH 10/10] FIX - JHOVE testing for WAVE changes - bumped version and date for `AIFF-hul`, `WAVE-hul` and `TIFF-hul`; - added version updates to baseline script; - copied `WAV-hul` module results due to wholesale changes; and - removed some text files from TIFF corpus. --- jhove-bbt/scripts/create-1.23-target.sh | 28 +- .../hul/ois/jhove/module/AiffModule.java | 4 +- .../hul/ois/jhove/module/TiffModule.java | 4 +- .../hul/ois/jhove/module/WaveModule.java | 4 +- .../modules/TIFF-hul/geotiff/bathy1.htm | 831 --------------- .../modules/TIFF-hul/geotiff/bathy1.tfw | 6 - .../modules/TIFF-hul/geotiff/bathy1.txt | 23 - .../modules/TIFF-hul/geotiff/compos.htm | 969 ------------------ .../modules/TIFF-hul/geotiff/compos.tfw | 6 - .../modules/TIFF-hul/geotiff/compos.txt | 23 - 10 files changed, 33 insertions(+), 1865 deletions(-) delete mode 100644 test-root/corpora/examples/modules/TIFF-hul/geotiff/bathy1.htm delete mode 100644 test-root/corpora/examples/modules/TIFF-hul/geotiff/bathy1.tfw delete mode 100644 test-root/corpora/examples/modules/TIFF-hul/geotiff/bathy1.txt delete mode 100644 test-root/corpora/examples/modules/TIFF-hul/geotiff/compos.htm delete mode 100644 test-root/corpora/examples/modules/TIFF-hul/geotiff/compos.tfw delete mode 100644 test-root/corpora/examples/modules/TIFF-hul/geotiff/compos.txt diff --git a/jhove-bbt/scripts/create-1.23-target.sh b/jhove-bbt/scripts/create-1.23-target.sh index 1068f690f..6904406c5 100644 --- a/jhove-bbt/scripts/create-1.23-target.sh +++ b/jhove-bbt/scripts/create-1.23-target.sh @@ -54,7 +54,7 @@ echo "Executing baseline update" # Copying baseline for now we're not making any changes cp -R "${baselineRoot}" "${targetRoot}" -# # Copy valid JP2K files across for new MIX metadata see https://github.com/openpreserve/jhove/pull/445 +# Copy valid JP2K files across for new MIX metadata see https://github.com/openpreserve/jhove/pull/445 if [[ -d "${candidateRoot}/examples/modules/JPEG2000-hul" ]]; then echo "Copying valid JPEG2000 examples." cp -Rf "${candidateRoot}/examples/modules/JPEG2000-hul" "${targetRoot}/examples/modules/" @@ -64,11 +64,37 @@ if [[ -d "${candidateRoot}/errors/modules/JPEG2000-hul" ]]; then cp -Rf "${candidateRoot}/errors/modules/JPEG2000-hul" "${targetRoot}/errors/modules/" fi +# Copy WAV files across for new MIX metadata see https://github.com/openpreserve/jhove/pull/445 +if [[ -d "${candidateRoot}/examples/modules/WAVE-hul" ]]; then + echo "Copying valid WAVE examples." + cp -Rf "${candidateRoot}/examples/modules/WAVE-hul" "${targetRoot}/examples/modules/" +fi +if [[ -d "${candidateRoot}/errors/modules/WAVE-hul" ]]; then + echo "Copying WAVE errors." + cp -Rf "${candidateRoot}/errors/modules/WAVE-hul" "${targetRoot}/errors/modules/" +fi + find "${targetRoot}" -type f -name "audit.jhove.xml" -exec sed -i 's/^ JPEG2000-hul<\/module>$/ JPEG2000-hul<\/module>/' {} \; find "${targetRoot}" -type f -name "audit.jhove.xml" -exec sed -i 's/^ XML/ XML/' {} \; find "${targetRoot}" -type f -name "audit-JPEG2000-hul.jhove.xml" -exec sed -i 's/^ 1.4.1<\/release>$/ 1.4.2<\/release>/' {} \; find "${targetRoot}" -type f -name "audit-JPEG2000-hul.jhove.xml" -exec sed -i 's/^ 2019-04-17<\/date>$/ 2019-10-18<\/date>/' {} \; +find "${targetRoot}" -type f -name "audit.jhove.xml" -exec sed -i 's/^ WAVE-hul<\/module>$/ WAVE-hul<\/module>/' {} \; +find "${targetRoot}" -type f -name "audit-WAVE-hul.jhove.xml" -exec sed -i 's/^ 1.7.1<\/release>$/ 1.8.1<\/release>/' {} \; +find "${targetRoot}" -type f -name "audit-WAVE-hul.jhove.xml" -exec sed -i 's/^ 2019-04-17<\/date>$/ 2019-12-10<\/date>/' {} \; + +find "${targetRoot}" -type f -name "*.aif.jhove.xml" -exec sed -i 's/^ AIFF-hul<\/reportingModule>$/ AIFF-hul<\/reportingModule>/' {} \; +find "${targetRoot}" -type f -name "*.AIF.jhove.xml" -exec sed -i 's/^ AIFF-hul<\/reportingModule>$/ AIFF-hul<\/reportingModule>/' {} \; +find "${targetRoot}" -type f -name "audit.jhove.xml" -exec sed -i 's/^ AIFF-hul<\/module>$/ AIFF-hul<\/module>/' {} \; +find "${targetRoot}" -type f -name "audit-AIFF-hul.jhove.xml" -exec sed -i 's/^ 1.5.1<\/release>$/ 1.6.1<\/release>/' {} \; +find "${targetRoot}" -type f -name "audit-AIFF-hul.jhove.xml" -exec sed -i 's/^ 2019-04-17<\/date>$/ 2019-12-10<\/date>/' {} \; + +find "${targetRoot}" -type f -name "*.tif.jhove.xml" -exec sed -i 's/^ TIFF-hul<\/reportingModule>$/ TIFF-hul<\/reportingModule>/' {} \; +find "${targetRoot}" -type f -name "*.g3.jhove.xml" -exec sed -i 's/^ TIFF-hul<\/reportingModule>$/ TIFF-hul<\/reportingModule>/' {} \; +find "${targetRoot}" -type f -name "audit.jhove.xml" -exec sed -i 's/^ TIFF-hul<\/module>$/ TIFF-hul<\/module>/' {} \; +find "${targetRoot}" -type f -name "audit-TIFF-hul.jhove.xml" -exec sed -i 's/^ 1.9.1<\/release>$/ 1.10.1<\/release>/' {} \; +find "${targetRoot}" -type f -name "audit-TIFF-hul.jhove.xml" -exec sed -i 's/^ 2019-04-17<\/date>$/ 2019-12-10<\/date>/' {} \; + find "${targetRoot}" -type f -name "audit-TIFF-hul.jhove.xml" -exec xmlstarlet ed --inplace -N 'ns=http://schema.openpreservation.org/ois/xml/ns/jhove' -d '//ns:identifiers[.//ns:identifier//ns:value[text()="http://hul.harvard.edu/jhove/references.html#classf" ]]' {} \; find "${targetRoot}" -type f -name "audit-TIFF-hul.jhove.xml" -exec sed -i '/^ $/d' {} \; diff --git a/jhove-modules/aiff-hul/src/main/java/edu/harvard/hul/ois/jhove/module/AiffModule.java b/jhove-modules/aiff-hul/src/main/java/edu/harvard/hul/ois/jhove/module/AiffModule.java index d82189c3a..5d2c0d2b3 100644 --- a/jhove-modules/aiff-hul/src/main/java/edu/harvard/hul/ois/jhove/module/AiffModule.java +++ b/jhove-modules/aiff-hul/src/main/java/edu/harvard/hul/ois/jhove/module/AiffModule.java @@ -111,8 +111,8 @@ public class AiffModule { 0X46, 0X4F, 0X52, 0X4D }; private static final String NAME = "AIFF-hul"; - private static final String RELEASE = "1.5.1"; - private static final int [] DATE = { 2019, 04, 17 }; + private static final String RELEASE = "1.6.1"; + private static final int [] DATE = { 2019, 12, 10 }; private static final String [] FORMAT = { "AIFF", "Audio Interchange File Format" }; diff --git a/jhove-modules/tiff-hul/src/main/java/edu/harvard/hul/ois/jhove/module/TiffModule.java b/jhove-modules/tiff-hul/src/main/java/edu/harvard/hul/ois/jhove/module/TiffModule.java index 8c3e40ba7..b3d36da21 100644 --- a/jhove-modules/tiff-hul/src/main/java/edu/harvard/hul/ois/jhove/module/TiffModule.java +++ b/jhove-modules/tiff-hul/src/main/java/edu/harvard/hul/ois/jhove/module/TiffModule.java @@ -121,8 +121,8 @@ public class TiffModule extends ModuleBase { protected Logger _logger; private static final String NAME = "TIFF-hul"; - private static final String RELEASE = "1.9.1"; - private static final int [] DATE = { 2019, 04, 17 }; + private static final String RELEASE = "1.10.1"; + private static final int [] DATE = { 2019, 12, 10 }; private static final String[] FORMAT = { "TIFF", "Tagged Image File Format" }; private static final String COVERAGE = "TIFF 4.0, 5.0, and 6.0; " + "TIFF/IT (ISO/DIS 12639:2003), including file types CT, LW, HC, MP, " diff --git a/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/WaveModule.java b/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/WaveModule.java index 236019523..fe7b83546 100644 --- a/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/WaveModule.java +++ b/jhove-modules/wave-hul/src/main/java/edu/harvard/hul/ois/jhove/module/WaveModule.java @@ -71,8 +71,8 @@ public class WaveModule extends ModuleBase { /* Module metadata */ private static final String NAME = "WAVE-hul"; - private static final String RELEASE = "1.7.1"; - private static final int [] DATE = { 2019, 04, 17 }; + private static final String RELEASE = "1.8.1"; + private static final int [] DATE = { 2019, 12, 10 }; private static final String[] FORMATS = { "WAVE", "Audio for Windows", "EBU Technical Specification 3285", "Broadcast Wave Format", "BWF", "EBU Technical Specification 3306", "RF64" }; diff --git a/test-root/corpora/examples/modules/TIFF-hul/geotiff/bathy1.htm b/test-root/corpora/examples/modules/TIFF-hul/geotiff/bathy1.htm deleted file mode 100644 index 741f847d4..000000000 --- a/test-root/corpora/examples/modules/TIFF-hul/geotiff/bathy1.htm +++ /dev/null @@ -1,831 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - bathymetry image of Sarasota, FL study area - - - - -

-

- -

-bathymetry image of Sarasota, FL study area

- -

-Metadata:

- - - -
-
-
-Identification_Information:
- -
-
-Citation:
- -
-
-Citation_Information:
- -
-
-Originator: David C. Twichell, Jr.
- -
-Publication_Date: 19980702
- -
-Title: bathymetry image of Sarasota, FL study area
- -
-Geospatial_Data_Presentation_Form: remote-sensing image
- -
-Publication_Information:
- -
-
-Publication_Place: Woods Hole Field Center
- -
-Publisher: USGS, Coastal and Marine Geology Team
-
-
-
- -
-Description:
- -
-
-Abstract:
- -
-The U.S. Geological Survey, in cooperation with the University of South -Florida and Eckerd College, completed a bathymetric, sidescan sonar, high-resolution -seismic-reflection, and surface sediment sampling survey of the inner shelf -environment along the western Florida coast. The survey area extends 15km -from Sarasota Point to Buttonwood Harbor. This study is part of a larger -program initiated by the U.S. Geological Survey to map the geologic framework -and monitor the modern processes that affect the western Florida coastal -zone. This portion of the project included a reconnaissance high-resolution -seismic and side-scan sonar surveys of the entire study area, detailed -mapping to identify patterns of hard grounds and sediment cover, and coring -of sediments to document historical development of the inner shelf and -coastal
- -
-Purpose:
- -
-This GIS overlay is a component of the Sarasota, Florida ArcView GIS database -and contains the gridded bathymetry data for the study area. Image resolution -is 4m pixels. Image dn values represent depth in decimeters.
- -
-Supplemental_Information:
- -
-This image has a smoothed pseudo-color table assigned to the look-up table.
-
- -
-Time_Period_of_Content:
- -
-
-Time_Period_Information:
- -
-
-Range_of_Dates/Times:
- -
-
-Beginning_Date: 19950502
- -
-Ending_Date: 19950508
-
-
- -
-Currentness_Reference: field_work
-
- -
-Status:
- -
-
-Progress: Complete
- -
-Maintenance_and_Update_Frequency: None planned
-
- -
-Spatial_Domain:
- -
-
-Bounding_Coordinates:
- -
-
-West_Bounding_Coordinate: -82.73332
- -
-East_Bounding_Coordinate: -82.56665
- -
-North_Bounding_Coordinate: 27.3856
- -
-South_Bounding_Coordinate: 27.2151
-
-
- -
-Keywords:
- -
-
-Theme:
- -
-
-Theme_Keyword_Thesaurus: General
- -
-Theme_Keyword: U.S. Geological Survey
- -
-Theme_Keyword: Woods Hole Field Center
- -
-Theme_Keyword: R/V BELLOWS
- -
-Theme_Keyword: BLWS 95-04
- -
-Theme_Keyword: May 2-8, 1995
- -
-Theme_Keyword: image
- -
-Theme_Keyword: TIFF
- -
-Theme_Keyword: geotiff
- -
-Theme_Keyword: ArcView
- -
-Theme_Keyword: bathymetry
- -
-Theme_Keyword: pseudo-color table
- -
-Theme_Keyword: smooth
- -
-Theme_Keyword_Thesaurus: PrincipalInvestigators
- -
-Theme_Keyword: David C. Twichell
- -
-Theme_Keyword: Guy Gelfenbaum
-
- -
-Place:
- -
-
-Place_Keyword_Thesaurus: General
- -
-Place_Keyword: Gulf of Mexico
- -
-Place_Keyword: Florida
- -
-Place_Keyword: West Florida shelf
- -
-Place_Keyword: Sarasota
- -
-Place_Keyword: Big Sarasota Pass
- -
-Place_Keyword: Longboat Key
- -
-Place_Keyword: Buttonwood Harbor
- -
-Place_Keyword: New Pass
- -
-Place_Keyword: Lido Key
-
-
- -
-Access_Constraints: none
- -
-Use_Constraints:
- -
-The U.S. Geological Survey must be referenced as the originator of the -dataset in any future products or research derived from these data.
- -
-Point_of_Contact:
- -
-
-Contact_Information:
- -
-
-Contact_Organization_Primary:
- -
-
-Contact_Organization: U.S. Geological Survey
- -
-Contact_Person: David Twichell
-
- -
-Contact_Position: Oceanographer
- -
-Contact_Address:
- -
-
-Address_Type: mailing and physical address
- -
-Address: 384 Woods Hole Road
- -
-City: Woods Hole
- -
-State_or_Province: MA
- -
-Postal_Code: 02543-1598
- -
-Country: USA
-
- -
-Contact_Voice_Telephone: (508) 548-8700 x2266
- -
-Contact_Facsimile_Telephone: (508) 457-2310
- -
-Contact_Electronic_Mail_Address: dtwichell@usgs.gov
- -
-Hours_of_Service: 8:00am-5:00pm ET; M-F
-
-
- -
-Browse_Graphic:
- -
-
-Browse_Graphic_File_Name: bathy1.tif
- -
-Browse_Graphic_File_Description: TIFF
- -
-Browse_Graphic_File_Type:
- -
-8-bit color image with smoothed pseudo-color table assigned to the LUT
-
- -
-Native_Data_Set_Environment:
- -
-PCI Remote Sensing Software; ESRI ARC/INFO data/imagery/utmd00/bathy1.tif
-
-
- -
-
-
-Data_Quality_Information:
- -
-
-Logical_Consistency_Report: .
- -
-Completeness_Report:
- -
-All collected data were processed and used to generate the digital mosaic.
- -
-Lineage:
- -
-
-Process_Step:
- -
-
-Process_Description: Tide-corrected depth measurements were gridded -in PCI.
- -
-Process_Date: 19940727
- -
-Process_Contact:
- -
-
-Contact_Information:
- -
-
-Contact_Organization_Primary:
- -
-
-Contact_Organization: U.S. Geological Survey
- -
-Contact_Person: David Twichell
-
- -
-Contact_Position: Oceanographer
- -
-Contact_Address:
- -
-
-Address_Type: mailing and physical address
- -
-Address: 384 Woods Hole Road
- -
-City: Woods Hole
- -
-State_or_Province: MA
- -
-Postal_Code: 02543-1598
- -
-Country: USA
-
- -
-Contact_Voice_Telephone: (508) 548-8700 x2266
- -
-Contact_Facsimile_Telephone: (508) 457-2310
- -
-Contact_Electronic_Mail_Address: dtwichell@usgs.gov
- -
-Hours_of_Service: 8:00am-5:00pm ET; M-F
-
-
-
-
-
-
- -
-
-
-Spatial_Data_Organization_Information:
- -
-
-Direct_Spatial_Reference_Method: Raster
- -
-Raster_Object_Information:
- -
-
-Raster_Object_Type: Pixel
- -
-Row_Count: 4617
- -
-Column_Count: 4063
-
-
-
- -
-
-
-Spatial_Reference_Information:
- -
-
-Horizontal_Coordinate_System_Definition:
- -
-
-Planar:
- -
-
-Map_Projection:
- -
-
-Map_Projection_Name: Transverse Mercator
- -
-Transverse_Mercator:
- -
-
-Scale_Factor_at_Central_Meridian: 0.99960
- -
-Longitude_of_Central_Meridian: -081.000000
- -
-Latitude_of_Projection_Origin: +00.000000
- -
-False_Easting: 500000
- -
-False_Northing: 0.00000
-
-
- -
-Planar_Coordinate_Information:
- -
-
-Planar_Coordinate_Encoding_Method: row and column
- -
-Coordinate_Representation:
- -
-
-Abscissa_Resolution: 4.0003238217
- -
-Ordinate_Resolution: 4.0465400583
-
- -
-Planar_Distance_Units: Meters
-
-
- -
-Geodetic_Model:
- -
-
-Horizontal_Datum_Name: North American Datum of 1983
- -
-Ellipsoid_Name: WGS84
- -
-Semi-major_Axis: 6378137.0
- -
-Denominator_of_Flattening_Ratio: 298.257223563
-
-
- -
-Vertical_Coordinate_System_Definition:
- -
-
-Depth_System_Definition:
- -
-
-Depth_Datum_Name: Mean sea level
- -
-Depth_Resolution: 4
- -
-Depth_Distance_Units: Meters
- -
-Depth_Encoding_Method: Implicit coordinate
-
-
-
-
- -
-
-
-Distribution_Information:
- -
-
-Distributor:
- -
-
-Contact_Information:
- -
-
-Contact_Organization_Primary:
- -
-
-Contact_Organization: U.S. Geological Survey
- -
-Contact_Person: Dave Twichell
-
- -
-Contact_Position: Data Librarian
- -
-Contact_Address:
- -
-
-Address_Type: mailing and physical address
- -
-Address: 384 Woods Hole Road
- -
-City: Woods Hole
- -
-State_or_Province: MA
- -
-Postal_Code: 02543-1598
- -
-Country: USA
-
- -
-Contact_Voice_Telephone: (508) 548-8700-2266
- -
-Contact_Facsimile_Telephone: (508) 457-2310
- -
-Contact_Electronic_Mail_Address: dtwichell@usgs.gov
-
-
- -
-Resource_Description: bathy1.tif
- -
-Distribution_Liability:
- -
-Although this derived data set has been used by the USGS, no warranty, -expressed or implied, is made by the USGS as to the accuracy of the data -and/or related materials. The act of distribution shall not constitute -any such warranty, and no responsibility is assumed by the USGS in the -use of these data or related materials.
- -
-Standard_Order_Process:
- -
-
-Digital_Form:
- -
-
-Digital_Transfer_Information:
- -
-
-Format_Name: TIFF
- -
-File_Decompression_Technique: No compression applied
- -
-Transfer_Size: 18,340Kb
-
- -
-Digital_Transfer_Option:
- -
-
-Offline_Option:
- -
-
-Offline_Media: CD-ROM
- -
-Recording_Capacity:
- -
-
-Recording_Density: 650
- -
-Recording_Density_Units: Mbytes
-
- -
-Recording_Format: ISO 9600
- -
-Compatibility_Information:
- -
-The user must have a CD-ROM capable of reading an ISO 9660 standard CD-ROM.
-
-
-
- -
-Fees: unknown
-
- -
-Technical_Prerequisites:
- -
-The user must have a program capable of reading and processing 'geotiff' -images.
-
-
- -
-
-
-Metadata_Reference_Information:
- -
-
-Metadata_Date: 19990607
- -
-Metadata_Contact:
- -
-
-Contact_Information:
- -
-
-Contact_Organization_Primary:
- -
-
-Contact_Organization: USGS, Coastal and Marine Geology Team
- -
-Contact_Person: Valerie Paskevich
-
- -
-Contact_Position: Computer Specialist
- -
-Contact_Address:
- -
-
-Address_Type: mailing and physical address
- -
-Address: 384 Woods Hole Road
- -
-City: Woods Hole
- -
-State_or_Province: MA
- -
-Postal_Code: 02543-1598
- -
-Country: USA
-
- -
-Contact_Voice_Telephone: (508) 548-8700 x2281
- -
-Contact_Facsimile_Telephone: (508) 457-2310
- -
-Contact_Electronic_Mail_Address: vpaskevich@usgs.gov
-
-
- -
-Metadata_Standard_Name: FGDC CSDGM
- -
-Metadata_Standard_Version: 19940608
- -
-Metadata_Time_Convention: Local time
- -
-Metadata_Access_Constraints: None
- -
-Metadata_Use_Constraints: None
-
-
- -
Generated by mp -on Mon Jun 7 14:14:23 1999 - - diff --git a/test-root/corpora/examples/modules/TIFF-hul/geotiff/bathy1.tfw b/test-root/corpora/examples/modules/TIFF-hul/geotiff/bathy1.tfw deleted file mode 100644 index 7095df194..000000000 --- a/test-root/corpora/examples/modules/TIFF-hul/geotiff/bathy1.tfw +++ /dev/null @@ -1,6 +0,0 @@ - 4.0003238217 - 0.0000000000 - 0.0000000000 - -4.0465400583 - 328618.7785648734 - 3030119.9951005648 diff --git a/test-root/corpora/examples/modules/TIFF-hul/geotiff/bathy1.txt b/test-root/corpora/examples/modules/TIFF-hul/geotiff/bathy1.txt deleted file mode 100644 index cf8b699b9..000000000 --- a/test-root/corpora/examples/modules/TIFF-hul/geotiff/bathy1.txt +++ /dev/null @@ -1,23 +0,0 @@ -PROREP Georeference Segment Report V6.2 EASI/PACE 07:15 15-Jan-99 - -bathy1.tif [S 1BIC 4063P 4617L] 13-Jan-99 - - 1:GEOref Type:150 [Georeferencing ] Last Update: 12:14 13-Jan-99 - Contents: Master Georeferencing Segment for File - - Output Georeferenced Units : UTM 17 D000 - Projection : Universal Transverse Mercator Zone 17 - Earth Ellipsoid : - Upper Left Corner : 328616.778 E 3030122.018 N - Upper Right Corner : 344870.094 E 3030122.018 N - Image Centre : 336743.436 E 3020780.581 N - Lower Left Corner : 328616.778 E 3011439.143 N - Lower Right Corner : 344870.094 E 3011439.143 N - Pixel Size : 4.000 E 4.047 N - - Upper Left Corner : 82d43'59.36" W Lon 27d23'01.15" N Lat - Upper Right Corner : 82d34'07.84" W Lon 27d23'08.15" N Lat - Image Centre : 82d38'59.11" W Lon 27d18'01.26" N Lat - Lower Left Corner : 82d43'49.94" W Lon 27d12'54.21" N Lat - Lower Right Corner : 82d33'59.31" W Lon 27d13'01.16" N Lat - diff --git a/test-root/corpora/examples/modules/TIFF-hul/geotiff/compos.htm b/test-root/corpora/examples/modules/TIFF-hul/geotiff/compos.htm deleted file mode 100644 index 8be43e19e..000000000 --- a/test-root/corpora/examples/modules/TIFF-hul/geotiff/compos.htm +++ /dev/null @@ -1,969 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - Composite digital sidescan sonar mosaic of Sarasota, FL - - - - -

-

- -

-Composite digital sidescan sonar mosaic of Sarasota, FL

- -

-Metadata:

- - - -
-
-
-Identification_Information:
- -
-
-Citation:
- -
-
-Citation_Information:
- -
-
-Originator: David C. Twichell, Jr.
- -
-Publication_Date: 19980702
- -
-Title: Composite digital sidescan sonar mosaic of Sarasota, FL
- -
-Geospatial_Data_Presentation_Form: remote-sensing image
- -
-Publication_Information:
- -
-
-Publication_Place: Woods Hole Field Center
- -
-Publisher: USGS, Coastal and Marine Geology Team
-
-
-
- -
-Description:
- -
-
-Abstract:
- -
-The U.S. Geological Survey, in cooperation with the University of South -Florida and Eckerd College, completed a bathymetric, sidescan sonar, high-resolution -seismic-reflection, and surface sediment sampling survey of the inner shelf -environment along the western Florida coast. The survey area extends 15km -from Sarasota Point to Buttonwood Harbor. This study is part of a larger -program initiated by the U.S. Geological Survey to map the geologic framework -and monitor the modern processes that affect the western Florida coastal -zone. This portion of the project included a reconnaissance high-resolution -seismic and side-scan sonar surveys of the entire study area, detailed -mapping to identify patterns of hard grounds and sediment cover, and coring -of sediments to document historical development of the inner shelf and -coastal
- -
-Purpose:
- -
-This GIS overlay is a component of the Sarasota, Florida ArcView GIS database -and contains the completed sidescan sonar mosaic for the study area. Image -resolution is 4m pixels and has a black background surrounding the composite -mosaic.
-
- -
-Time_Period_of_Content:
- -
-
-Time_Period_Information:
- -
-
-Range_of_Dates/Times:
- -
-
-Beginning_Date: 19950502
- -
-Ending_Date: 19950508
-
-
- -
-Currentness_Reference: field_work
-
- -
-Status:
- -
-
-Progress: Complete
- -
-Maintenance_and_Update_Frequency: None planned
-
- -
-Spatial_Domain:
- -
-
-Bounding_Coordinates:
- -
-
-West_Bounding_Coordinate: -82.73332
- -
-East_Bounding_Coordinate: -82.56665
- -
-North_Bounding_Coordinate: 27.3856
- -
-South_Bounding_Coordinate: 27.2151
-
-
- -
-Keywords:
- -
-
-Theme:
- -
-
-Theme_Keyword_Thesaurus: General
- -
-Theme_Keyword: U.S. Geological Survey
- -
-Theme_Keyword: Woods Hole Field Center
- -
-Theme_Keyword: R/V BELLOWS
- -
-Theme_Keyword: BLWS 95-04
- -
-Theme_Keyword: May 2-8, 1995
- -
-Theme_Keyword: image
- -
-Theme_Keyword: TIFF
- -
-Theme_Keyword: geotiff
- -
-Theme_Keyword: ArcView
- -
-Theme_Keyword: sidescan sonar mosaic
- -
-Theme_Keyword_Thesaurus: PrincipalInvestigators
- -
-Theme_Keyword: David C. Twichell
- -
-Theme_Keyword: Guy Gelfenbaum
-
- -
-Place:
- -
-
-Place_Keyword_Thesaurus: General
- -
-Place_Keyword: Gulf of Mexico
- -
-Place_Keyword: Florida
- -
-Place_Keyword: West Florida shelf
- -
-Place_Keyword: Sarasota
- -
-Place_Keyword: Big Sarasota Pass
- -
-Place_Keyword: Longboat Key
- -
-Place_Keyword: Buttonwood Harbor
- -
-Place_Keyword: New Pass
- -
-Place_Keyword: Lido Key
-
-
- -
-Access_Constraints: none
- -
-Use_Constraints:
- -
-The U.S. Geological Survey must be referenced as the originator of the -dataset in any future products or research derived from these data.
- -
-Point_of_Contact:
- -
-
-Contact_Information:
- -
-
-Contact_Organization_Primary:
- -
-
-Contact_Organization: U.S. Geological Survey
- -
-Contact_Person: David Twichell
-
- -
-Contact_Position: Oceanographer
- -
-Contact_Address:
- -
-
-Address_Type: mailing and physical address
- -
-Address: 384 Woods Hole Road
- -
-City: Woods Hole
- -
-State_or_Province: MA
- -
-Postal_Code: 02543-1598
- -
-Country: USA
-
- -
-Contact_Voice_Telephone: (508) 548-8700 x2266
- -
-Contact_Facsimile_Telephone: (508) 457-2310
- -
-Contact_Electronic_Mail_Address: dtwichell@usgs.gov
- -
-Hours_of_Service: 8:00am-5:00pm ET; M-F
-
-
- -
-Browse_Graphic:
- -
-
-Browse_Graphic_File_Name: compos.tif
- -
-Browse_Graphic_File_Description: TIFF
- -
-Browse_Graphic_File_Type: 8-bit gray scale composite mosaic with -black background
-
- -
-Native_Data_Set_Environment:
- -
-PCI Remote Sensing Software; ESRI ARC/INFO data/imagery/utmd00/compos.tif
-
-
- -
-
-
-Data_Quality_Information:
- -
-
-Logical_Consistency_Report: .
- -
-Completeness_Report:
- -
-All collected data were processed and used to generate the digital mosaic.
- -
-Lineage:
- -
-
-Process_Step:
- -
-
-Process_Description:
- -
-The individual swaths were mapped with a specific map area and projection. -Two files were created with one containing the northwest to southeast lines -and the second containing the southeast to northwest lines. For detailed -information regarding the process, please refer to U.S. Geological Survey -Open-File Report 92-536. USGS, Coastal and Marine Geology Program
- -
-Source_Used_Citation_Abbreviation: QMIPS data
- -
-Process_Date: 19940620
- -
-Source_Produced_Citation_Abbreviation: WHIPS NetCDF files
- -
-Process_Contact:
- -
-
-Contact_Information:
- -
-
-Contact_Organization_Primary:
- -
-
-Contact_Organization: U.S. Geological Survey
- -
-Contact_Person: David Twichell
-
- -
-Contact_Position: Oceanographer
- -
-Contact_Address:
- -
-
-Address_Type: mailing and physical address
- -
-Address: 384 Woods Hole Road
- -
-City: Woods Hole
- -
-State_or_Province: MA
- -
-Postal_Code: 02543-1598
- -
-Country: USA
-
- -
-Contact_Voice_Telephone: (508) 548-8700 x2266
- -
-Contact_Facsimile_Telephone: (508) 457-2310
- -
-Contact_Electronic_Mail_Address: dtwichell@usgs.gov
- -
-Hours_of_Service: 8:00am-5:00pm ET; M-F
-
-
-
- -
-Process_Step:
- -
-
-Process_Description:
- -
-The two files containing the georeferenced strips were imported to the -PCI Remote Sensing software and combined utilizing their GCPworks software -package. For detailed information regarding the process, please refer to -U.S. Geological Survey Open-File Report 96-281.
- -
-Source_Used_Citation_Abbreviation: WHIPS NetCDF files
- -
-Process_Date: 19940621
- -
-Source_Produced_Citation_Abbreviation: sarasota.pix
- -
-Process_Contact:
- -
-
-Contact_Information:
- -
-
-Contact_Organization_Primary:
- -
-
-Contact_Organization: U.S. Geological Survey
- -
-Contact_Person: David Twichell
-
- -
-Contact_Position: Oceanographer
- -
-Contact_Address:
- -
-
-Address_Type: mailing and physical address
- -
-Address: 384 Woods Hole Road
- -
-City: Woods Hole
- -
-State_or_Province: MA
- -
-Postal_Code: 02543-1598
- -
-Country: USA
-
- -
-Contact_Voice_Telephone: (508) 548-8700 x2266
- -
-Contact_Facsimile_Telephone: (508) 457-2310
- -
-Contact_Electronic_Mail_Address: dtwichell@usgs.gov
- -
-Hours_of_Service: 8:00am-5:00pm ET; M-F
-
-
-
- -
-Process_Step:
- -
-
-Process_Description:
- -
-The final 1 meter mosaic was resampled to 4 meter resolution and reprojected -to UTM. The final image was output as a geotiff image for archiving. To -obtain the full 1 meter mosaic, please contact the originator of the dataset.
- -
-Source_Used_Citation_Abbreviation: sarasota.pix
- -
-Process_Date: 19980702
- -
-Source_Produced_Citation_Abbreviation: utmd00.pix
- -
-Process_Contact:
- -
-
-Contact_Information:
- -
-
-Contact_Organization_Primary:
- -
-
-Contact_Organization: U.S. Geological Survey
- -
-Contact_Person: Valerie Paskevich
-
- -
-Contact_Position: Computer Specialist
- -
-Contact_Address:
- -
-
-Address_Type: mailing and physical address
- -
-Address: 384 Woods Hole Road
- -
-City: Woods Hole
- -
-State_or_Province: MA
- -
-Postal_Code: 02543-1598
- -
-Country: USA
-
- -
-Contact_Voice_Telephone: (508) 548-8700 x2281
- -
-Contact_Facsimile_Telephone: (508) 457-2310
- -
-Contact_Electronic_Mail_Address: vpaskevich@usgs.gov
-
-
-
-
-
-
- -
-
-
-Spatial_Data_Organization_Information:
- -
-
-Direct_Spatial_Reference_Method: Raster
- -
-Raster_Object_Information:
- -
-
-Raster_Object_Type: Pixel
- -
-Row_Count: 4617
- -
-Column_Count: 4063
-
-
-
- -
-
-
-Spatial_Reference_Information:
- -
-
-Horizontal_Coordinate_System_Definition:
- -
-
-Planar:
- -
-
-Map_Projection:
- -
-
-Map_Projection_Name: Transverse Mercator
- -
-Transverse_Mercator:
- -
-
-Scale_Factor_at_Central_Meridian: 0.99960
- -
-Longitude_of_Central_Meridian: -081.000000
- -
-Latitude_of_Projection_Origin: +00.000000
- -
-False_Easting: 500000
- -
-False_Northing: 0.00000
-
-
- -
-Planar_Coordinate_Information:
- -
-
-Planar_Coordinate_Encoding_Method: row and column
- -
-Coordinate_Representation:
- -
-
-Abscissa_Resolution: 4.0003238217
- -
-Ordinate_Resolution: 4.0465400583
-
- -
-Planar_Distance_Units: Meters
-
-
- -
-Geodetic_Model:
- -
-
-Horizontal_Datum_Name: North American Datum of 1983
- -
-Ellipsoid_Name: WGS84
- -
-Semi-major_Axis: 6378137.0
- -
-Denominator_of_Flattening_Ratio: 298.257223563
-
-
-
-
- -
-
-
-Distribution_Information:
- -
-
-Distributor:
- -
-
-Contact_Information:
- -
-
-Contact_Organization_Primary:
- -
-
-Contact_Organization: U.S. Geological Survey
- -
-Contact_Person: Dave Twichell
-
- -
-Contact_Position: Data Librarian
- -
-Contact_Address:
- -
-
-Address_Type: mailing and physical address
- -
-Address: 384 Woods Hole Road
- -
-City: Woods Hole
- -
-State_or_Province: MA
- -
-Postal_Code: 02543-1598
- -
-Country: USA
-
- -
-Contact_Voice_Telephone: (508) 548-8700-2266
- -
-Contact_Facsimile_Telephone: (508) 457-2310
- -
-Contact_Electronic_Mail_Address: dtwichell@usgs.gov
-
-
- -
-Resource_Description: compos.tif
- -
-Distribution_Liability:
- -
-Although this derived data set has been used by the USGS, no warranty, -expressed or implied, is made by the USGS as to the accuracy of the data -and/or related materials. The act of distribution shall not constitute -any such warranty, and no responsibility is assumed by the USGS in the -use of these data or related materials.
- -
-Standard_Order_Process:
- -
-
-Digital_Form:
- -
-
-Digital_Transfer_Information:
- -
-
-Format_Name: TIFF
- -
-File_Decompression_Technique: No compression applied
- -
-Transfer_Size: 18,338Kb
-
- -
-Digital_Transfer_Option:
- -
-
-Offline_Option:
- -
-
-Offline_Media: CD-ROM
- -
-Recording_Capacity:
- -
-
-Recording_Density: 650
- -
-Recording_Density_Units: Mbytes
-
- -
-Recording_Format: ISO 9600
- -
-Compatibility_Information:
- -
-The user must have a CD-ROM capable of reading an ISO 9660 standard CD-ROM.
-
-
-
- -
-Fees: unknown
-
- -
-Technical_Prerequisites:
- -
-The user must have a program capable of reading and processing 'geotiff' -images.
-
-
- -
-
-
-Metadata_Reference_Information:
- -
-
-Metadata_Date: 19990607
- -
-Metadata_Contact:
- -
-
-Contact_Information:
- -
-
-Contact_Organization_Primary:
- -
-
-Contact_Organization: USGS, Coastal and Marine Geology Team
- -
-Contact_Person: Valerie Paskevich
-
- -
-Contact_Position: Computer Specialist
- -
-Contact_Address:
- -
-
-Address_Type: mailing and physical address
- -
-Address: 384 Woods Hole Road
- -
-City: Woods Hole
- -
-State_or_Province: MA
- -
-Postal_Code: 02543-1598
- -
-Country: USA
-
- -
-Contact_Voice_Telephone: (508) 548-8700 x2281
- -
-Contact_Facsimile_Telephone: (508) 457-2310
- -
-Contact_Electronic_Mail_Address: vpaskevich@usgs.gov
-
-
- -
-Metadata_Standard_Name: FGDC CSDGM
- -
-Metadata_Standard_Version: 19940608
- -
-Metadata_Time_Convention: Local time
- -
-Metadata_Access_Constraints: None
- -
-Metadata_Use_Constraints: None
-
-
- -
Generated by mp -on Mon Jun 7 14:13:59 1999 - - diff --git a/test-root/corpora/examples/modules/TIFF-hul/geotiff/compos.tfw b/test-root/corpora/examples/modules/TIFF-hul/geotiff/compos.tfw deleted file mode 100644 index 7095df194..000000000 --- a/test-root/corpora/examples/modules/TIFF-hul/geotiff/compos.tfw +++ /dev/null @@ -1,6 +0,0 @@ - 4.0003238217 - 0.0000000000 - 0.0000000000 - -4.0465400583 - 328618.7785648734 - 3030119.9951005648 diff --git a/test-root/corpora/examples/modules/TIFF-hul/geotiff/compos.txt b/test-root/corpora/examples/modules/TIFF-hul/geotiff/compos.txt deleted file mode 100644 index 3def77b41..000000000 --- a/test-root/corpora/examples/modules/TIFF-hul/geotiff/compos.txt +++ /dev/null @@ -1,23 +0,0 @@ -PROREP Georeference Segment Report V6.2 EASI/PACE 07:15 15-Jan-99 - -compos.tif [S 1BIC 4063P 4617L] 13-Jan-99 - - 1:GEOref Type:150 [Georeferencing ] Last Update: 12:14 13-Jan-99 - Contents: Master Georeferencing Segment for File - - Output Georeferenced Units : UTM 17 D000 - Projection : Universal Transverse Mercator Zone 17 - Earth Ellipsoid : - Upper Left Corner : 328616.778 E 3030122.018 N - Upper Right Corner : 344870.094 E 3030122.018 N - Image Centre : 336743.436 E 3020780.581 N - Lower Left Corner : 328616.778 E 3011439.143 N - Lower Right Corner : 344870.094 E 3011439.143 N - Pixel Size : 4.000 E 4.047 N - - Upper Left Corner : 82d43'59.36" W Lon 27d23'01.15" N Lat - Upper Right Corner : 82d34'07.84" W Lon 27d23'08.15" N Lat - Image Centre : 82d38'59.11" W Lon 27d18'01.26" N Lat - Lower Left Corner : 82d43'49.94" W Lon 27d12'54.21" N Lat - Lower Right Corner : 82d33'59.31" W Lon 27d13'01.16" N Lat -