def _rio_transform(riods):
    """
    Get the transform from a rasterio dataset
    reguardless of rasterio version.
    """
    try:
        return riods.transform
    except AttributeError:
        return riods.affine
