def __init__(
        self, in_tile=None, in_data=None, out_profile=None, out_tile=None, tags=None
    ):
        """Prepare data & profile."""
        out_tile = in_tile if out_tile is None else out_tile
        _validate_write_window_params(in_tile, out_tile, in_data, out_profile)
        self.data = extract_from_array(
            in_raster=in_data,
            in_affine=in_tile.affine,
            out_tile=out_tile
        )
        # use transform instead of affine
        if "affine" in out_profile:
            out_profile["transform"] = out_profile.pop("affine")
        self.profile = out_profile
        self.tags = tags
def __init__ ( self , in_tile = None , in_data = None , out_profile = None , out_tile = None , tags = None ) : out_tile = in_tile if out_tile is None else out_tile _validate_write_window_params ( in_tile , out_tile , in_data , out_profile ) self . data = extract_from_array ( in_raster = in_data , in_affine = in_tile . affine , out_tile = out_tile ) if "affine" in out_profile : out_profile [ "transform" ] = out_profile . pop ( "affine" ) self . profile = out_profile self . tags = tags
Prepare data & profile.