-
Notifications
You must be signed in to change notification settings - Fork 1
Description
@gillins has rightly raised a question mark around the notion of whether one should add history to a VRT file, and whether the component files of the VRT are themselves parents of that VRT, for the purposes of processinghistory.
It seems fairly plain that doing so naively has the potential to create ambiguities. The VRT contains no data itself - the component files are used directly when reading the VRT. This means that a VRT could be created from a given version of a component file, and a full history included, but then if the component file were updated, the new data would pass straight through when the VRT was read, but the embedded history would not reflect this.
So, some other approach is required, which would probably treat VRTs as a special case within processinghistory. It is questionable whether the notion of a component file should be handled the same way as a parent file - the relationship is, in some ways, fundamentally different.
One possible scheme which comes to mind is to store in the VRT only the metadata for the VRT itself, no parents allowed, but instead a list of component files. This would be just the filenames, no timestamps. When the history for the file is read, the component files could be read for their history, on-the-fly, and this would then be available as ancestor metadata for any child of the VRT, while still being distinguished as components rather than parents of the VRT itself. This kind of matches what happens when reading a VRT for the data - it is read on-the-fly directly from the component files.
Not sure if the list of component files needs to be stored explicitly, as it is available via Dataset.GetFileList(). Similarly, should the metadata have an explicit flag to say that it is a VRT, or should one rely on the fact that the VRT driver is in use?
I am still exploring this possible solution for any traps, so it does not yet exist except in my head. Any thoughts are welcome.