Closed barryrowlingson closed 2 years ago
Took me a while to figure this out. Current MTL files do no longer have this padding (since a format revision in 2014). The file packaged in RStoolbox, however, is still in the legacy MTL format, which had a fixed size padding.
The padding "was historically used to distribute a fixed-size MTL to support the HDF4 format" see USGS news here
Is there a reason why the sample file LT52240631988227CUB02_MTL.txt is padded out to 64k with zero bytes? Here's the start and end of a hex dump of the file recently downloaded from github, its the same with the file installed from the CRAN package:
Seems weird, and throws up problems when trying to grep for patterns in it, since grep thinks its a binary file, requiring a
-a
option to get anything out:Download error? File corruption? Or is the standard to pad files out to 64k boundaries because reasons?