def shape(self):
        """Returns a tuple of row, column, (band count if multidimensional)."""
        shp = (self.ds.RasterYSize, self.ds.RasterXSize, self.ds.RasterCount)
        return shp[:2] if shp[2] <= 1 else shp