Skip to content

Raster astype() converts the nodata by default even if type is the same #627

Open
@rhugonnet

Description

We previously discussed having a convert_nodata option to Raster.astype() to ensure nodata is supported, and avoid problems when writing etc..., which is now the default:

def astype(

However, if the type is the same, astype will still update the nodata value, which is not intuitive (made me look for a bug in tests for an 1h when running raster_equal(). Should we skip convert_nodata in the case where astype() is the same as the existing type, and (potentially) raise a warning?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions