[gdal-dev] gdaladdo / BuildOverviews mismatch

Even Rouault even.rouault at mines-paris.org
Wed May 28 14:46:06 EDT 2008


Ben,

In my understanding and by 'grepping' a bit, AVERAGE_BIT2* are currently 
specific to GTiff and HFA drivers when wanting to create nice-looking 
overviews on 1bit rasters. But as both drivers can be used for external 
overviews for some drivers, it is probably of more general interest. Would 
need confirmation of that.

A quick look in the code seems to show that NO_REGEN is strictly internal to 
HFA driver.

MODE is completely unimplemented and should be removed from the docs, but in 
ticket #2347 there's a patch that provides an implementation, so maybe it 
will go in the code some day...

AVERAGE_MP seems to be implemented in overview.cpp, so the question is "is the 
implementation broken ?" or "is the mention in the doc that it must not to be 
used obsolete ?" I don't know...
I've never use AVERAGE_MAGPHASE too, so I don't know its status too. None of 
them are tested in the autotest suite, so that would be a great addition.

Well, anyway you can create a ticket in Trac if you wish and attach patches 
for the various documentation fixes.

Even

Le Wednesday 28 May 2008 10:09:00 Ben Discoe, vous avez écrit :
> I am trying to figure out exactly what options exist for overlays, and the
> documentation has some problems.
>
> For the application gdaladdo, documented here:
> http://www.gdal.org/gdaladdo.html
>
> It says the resampling methods are "nearest, average, average_mp,
> average_magphase, mode", with "average_mp" and "mode" not to be used.
>
> In the underlying function GDALDataset::BuildOverviews:
> http://www.gdal.org/classGDALDataset.html
>
> It says the resampling methods are "NEAREST", "AVERAGE" or "MODE".
>
> It seems these are not in agreement.  In the source code itself (gdal
> 1.5.1, overview.cpp) there are mentions of:
>
> 	"NEAR*"
> 	"AVER*"
> 	"AVERAGE_MAGPHASE"
> 	"AVERAGE_BIT2*"
> 	"AVERAGE_BIT2GRAYSCALE"
> 	"AVERAGE_BIT2GRAYSCALE_MINISWHITE"
> 	"AVERAGE_MP"
> 	"NO_REGEN:"
>
> It seems that both the developer and end-user documentation needs updating
> to reflect the actual options available.  E.g. adding and explaining the
> BIT2 options and removing MODE.  gdaladdo should also state what the
> default method is (i had to read the source code to find out it is
> "nearest".)
>
> Do these sort of doc fixes need to be logged in Trac, or is there some
> other way they get done?
>
> Thanks,
> Ben
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev




More information about the gdal-dev mailing list