Calculating statistics modifies relativeToVRT attribute
|Reported by:||Mike Taves||Owned by:||warmerdam|
Creating a VRT file using
gdalbuildvrt generally creates a VRT file with relative paths to files, e.g.:
However, after calculating raster statistics through either
gdalinfo -stats mosaic.vrt or calling GDALRasterBand::GetStatistics, this attribute is modified to the default
relativeToVRT="0" and the content is modified to an absolute file path:
This quiet modification of the VRT file structure is not expected, and may break the links if the structure is later moved to a different path (assuming the links are still relative).
It would be preferred to preserve the
relativeToVRT attribute for VRT files when calculating statistics.