georust/gdal

No iterator support for rasterbands

arya-pathak opened this issue · 0 comments

There is no way to use an iterator over the rasterbands of a dataset, the only way to access them is through either indexing using the .rasterband() method, or indirectly specifying a range and iterating over that.
For instance: (a..b).into_iter().for_each(|idx| { ds.rasterband(idx); });
Is there any way to do this directly? The dataset layers has a method .layers() that enables iterating over the layers of it. Anything similar for rasterbands would be helpful.

cc: @rkshthrmsh