#5985 closed defect (fixed)
Calculating statistics modifies relativeToVRT attribute
Reported by: | Mike Taves | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 2.0.0 |
Component: | default | Version: | 1.11.2 |
Severity: | normal | Keywords: | |
Cc: | antonio |
Description
Creating a VRT file using gdalbuildvrt
generally creates a VRT file with relative paths to files, e.g.:
<SourceFilename relativeToVRT="1">tmp/gdalbuildvrt1.tif</SourceFilename>
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:
<SourceFilename relativeToVRT="0">/path/to/tmp/gdalbuildvrt1.tif</SourceFilename>
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.
Change History (4)
comment:1 by , 9 years ago
Cc: | added |
---|
comment:2 by , 9 years ago
Milestone: | → 2.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
trunk r29291, branches/2.0 r29292 "VRT: preserves relative links on reserialization of existing VRT (#5985)"