Skip to content

Improvements to band_tags #799

Description

@neda-dtu

I was working on adding GDAL Metadata to a GeoTiff file, as it is needed for getting the minimum and maximum values when using Geotiff.js. I tried adding the STATISTICS_MINIMUM and STATISTICS_MAXIMUM in a few ways, but wasn't able to get it to work until I found out about the undocumented band_tags key for the tags argument of to_raster.

  1. It would great to have documentation of this features, perhaps with an example. I could add a mention of it in the docstring. Would there be other documentation that you think could be helpful?

  2. As described in Envi header information is stripped on write #635 the tags are flattened when read into attributes on read, so band_tags do not round trip between read and write. It seems that XArray will allow for dictionary based attributes. Would this be a feature of interest? I guess it would need to have a toggle on read, as NetCDF doesn't allow dicts as attributes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    proposalIdea for a new feature.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions