class_docstr: Mixin providing methods for window-related calculations.
  These methods are wrappers for the functionality in
  `rasterio.windows` module.
  
  A subclass with this mixin MUST provide the following
  properties: `transform`, `height` and `width`.
class_docstr_tok: ["Mixin","providing","methods","for","window-related","calculations",".","These","methods","are","wrappers","for","the","functionality","in","`","rasterio.windows","`","module",".","A","subclass","with","this","mixin","MUST","provide","the","following","properties",":","`","transform","`",",","`","height","`","and","`","width","`","."]
docstr: Get the affine transform for a dataset window.
  
  Parameters
  ----------
  window: rasterio.windows.Window
      Dataset window
  
  Returns
  -------
  transform: Affine
      The affine transform matrix for the given window
docstr_tok: ["Get","the","affine","transform","for","a","dataset","window",".","Parameters","--","--","--","--","--","window",":","rasterio.windows.Window","Dataset","window","Returns","--","--","--","-","transform",":","Affine","The","affine","transform","matrix","for","the","given","window"]
code: def window_transform(self, window):
      """Get the affine transform for a dataset window.
  
      Parameters
      ----------
      window: rasterio.windows.Window
          Dataset window
  
      Returns
      -------
      transform: Affine
          The affine transform matrix for the given window
  
      """
      gtransform = guard_transform(self.transform)
      return transform(window, gtransform)
  
imports: import collections
  from collections.abc import Iterable
  import functools
  import math
  import warnings
  from affine import Affine
  import attr
  import numpy
  from rasterio.errors import WindowError, RasterioDeprecationWarning
  from rasterio.transform import rowcol, guard_transform
label_desc: Use image node_id 2 for calling the WindowMethodsMixin obj's underlying member method code with example usage: obj.window_transform(window) and returns: transform