Opened 4 months ago

Closed 4 months ago

Last modified 3 months ago

#6954 closed defect (fixed)

VRT file with cutline behaves strangely with tiff with overviews

Reported by: pmeems Owned by: warmerdam
Priority: normal Milestone: 2.1.5
Component: GDAL_Raster Version: 2.1.3
Severity: normal Keywords:
Cc:

Description

I'm using GDAL v2.1.3

I have a tiff file (good.tif)

I cut this file with a border shapefile and save it to a VRT file using this command: gdalwarp -of VRT -cutline border.shp -crop_to_cutline -dstnodata 0 -overwrite good.tif wrong.vrt

I open this vrt-file in MapWindow5 and in QGis and it looks as expected.

I now add external overviews to the tiff file using: gdaladdo -ro -r nearest good.tif 2 4 8 16

I reopen the vrt file in both MapWindow5 and QGis and they only show a part of the tiff.

When I delete the .ovr file and reopen the vrt-file all is well again. I already tried running my GDALWarp command after creating the overviews but that doesn't matter.

Creating a tiff-file instead of a vrt-file results in a correct result.

Attached a zip-file with the tiff-file and the border-files.

Attachments (1)

gdalTrac.zip (12.3 KB) - added by pmeems 4 months ago.
Sample data

Download all attachments as: .zip

Change History (6)

Changed 4 months ago by pmeems

Attachment: gdalTrac.zip added

Sample data

comment:1 Changed 4 months ago by Even Rouault

Resolution: fixed
Status: newclosed

In 39480:

Warped VRT: correctly take into account cutline for implicit overviews; also avoid serializing a duplicate CUTLINE warping options in warped .vrt (fixes #6954)

comment:2 Changed 4 months ago by Even Rouault

In 39481:

Warped VRT: correctly take into account cutline for implicit overviews; also avoid serializing a duplicate CUTLINE warping options in warped .vrt (fixes #6954)

comment:3 Changed 4 months ago by Even Rouault

In 39482:

Warped VRT: correctly take into account cutline for implicit overviews; also avoid serializing a duplicate CUTLINE warping options in warped .vrt (fixes #6954)

comment:4 Changed 4 months ago by Even Rouault

Milestone: 2.1.5

comment:5 Changed 3 months ago by pmeems

I just updated my gdal binaries and I can confirm this has been fixed. Thanks Even for the quick response.

Note: See TracTickets for help on using tickets.