[gdal-dev] python: possible to get Dataset from Band

Paolo Corti pcorti at gmail.com
Tue Nov 9 18:10:08 EST 2010


> No, there's no direct way of doing it with an API call. But as you can only
> get a Band from a Dataset, you can easily do something like :
>
> band = ds.GetRasterBand(xxx)
> band.ds = ds

Do we really need this? As far as I remember band must be in the same
context of dataset (dataset can't go out of scope), so why would we
need a reference to it?
best regards
P

-- 
Paolo Corti
GIS specialist and web developer
web: http://www.paolocorti.net
twitter: @paolo_corti


More information about the gdal-dev mailing list