Skip to content

nodata encoding #87

@johntruckenbrodt

Description

@johntruckenbrodt

The output backscatter applies two nodata values: 0 (black area) and nan (white area):

Image

0 is not defined as nodata value in the metadata.

Temporary workaround: set a consistent nodata value in post:

ds = gdal.Open("gt.tif", GA_Update)
ar = ds.ReadAsArray()
ar[~np.isfinite(ar)] = -9999
ar[ar == 0] = -9999
band = ds.GetRasterBand(1)
band.SetNoDataValue(-9999)
band.WriteArray(ar)
band.FlushCache()
band = None
ds = None

Metadata

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