[gdal-dev] GDALDataSet::GetRasterXSize vs. GDALRasterBand::GetXSize

Frank Warmerdam warmerdam at pobox.com
Fri Apr 13 13:38:38 EDT 2012


On Fri, Apr 13, 2012 at 10:00 AM, David Strip <gdal at stripfamily.net> wrote:
> are there conditions under which these two values are not the same? It seems
> to me they should match, but maybe I'm missing something.

David,

The XSize of a dataset should always match the xsize of the bands
fetched with GetRasterBand() on the dataset.

However, bands for overviews, fetched with GetOverview() on the
band will not have the same size as the base band or the dataset
they are loosely associated with.  In some cases the overviews
actually are directly owned by a sort of hidden dataset but that may
not always be the case.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Software Developer


More information about the gdal-dev mailing list