Wrong behavior of minimum image size for overviews in preference dialog
Mantis Issue 1345, reported by jmichel, assigned to gpasero, created: 2017-01-23
First, this threshold is expressed in number of pixels, and is therefore not easy to set. It would be better to express it wrt image dimensions : max(width,height)<thresh
Second, the behavior seems incorrect to me : if images number of pixels is lower than the threshold, the overview dialog still shows but number of levels is 0 (so no overview is generated if the user click on Ok, or Ignore).
The expected behavior would be that the dialog does not show images whose size is bellow the threshold, and does not show at all if there are no images whose size is above the threshold.
1485281166 - gpaseroThe current rule implemented is "min(width,height)<thresh". The documentation may be misleading.
1485283915 - gpaseroFirst fix here to hide the dialog : https://git.orfeo-toolbox.org/otb.git/commit/288795bd9750a185763d0a3d708ecc0687ab6478
I don't think the threshold rule has to be changed to max...
1485342690 - julienI think it should be changed to max : if you have an image with a large height and a small width, you probably still want overviews ...
1485362756 - gpaseroAgreed, but I don't know if there is a risk to end up with an overview with width=1
1485428619 - gpaseroFixed here : https://git.orfeo-toolbox.org/otb.git/commit/e6977b6001b8be1c8a3e1b4e8c3684b215ceda69
The new behaviour is :
- compute all the overview sizes with a minimum size of 1 (as done by GDALOverviewBuilder::CountResolutions())
- for monteverdi, only keep the levels where at least one dimension is larger than the threshold
The behaviour of GDALOverviewBuilder is unchanged.