Skip to content

Add statstics for visualization to bands or assets #157

Open

Description

@m-mohr

ol-stac attempts to generate a default visualization for assets displayed on a map. Without additional metadata, it typically falls back to stretching values from the minimum to the maximum, which is prone to outliers and can result in poorly balanced visualizations.

By including statistical metadata such as min, max, median, and stddev, we can compute better visualizations; for example, using the mean ± 2σ (~95% of values) for a better visualization stretch instead of the full min/max extent (and if no min/max is provided, the min/max is the actual data type min/max).

I've looked through zarr.json for any statistical values but couldn't find any, and the STAC metadata doesn't include them either.
Any ideas on how to improve this? Specifically, would it be feasible to add statistics to the STAC assets and/or bands?

Activity

  1. m-mohr commented on Apr 17, 2026

    @m-mohr
    Author
  2. vincentsarago commented on Apr 21, 2026

    @vincentsarago

    could be nice to create a statistics zarr convention which tell the min/max/mean/median/stdev values for arrays

  3. emmanuelmathot commented on Apr 28, 2026

    @emmanuelmathot
    Contributor

    from WP1 meeting. We would need both Zarr and STAC level. For Zarr, a new convention would be useful.

  4. lhoupert commented on Oct 16, 2026

    @lhoupert
    Contributor

    @claxn @shollendEODC can you add these statistics when creating new STAC items? we would need that for being able to visualise assets map on stac browser . See the issue described in more details here: EOPF-Explorer/data-pipeline#105 (comment)

  5. m-mohr commented on Oct 16, 2026

    @m-mohr
    Author

    Ideally it would contain:

    • 'maximum'
    • 'mean'
    • 'minimum'
    • 'stddev'
  6. claxn commented on Oct 20, 2026

    @claxn
    Collaborator

    @claxn @shollendEODC can you add these statistics when creating new STAC items? we would need that for being able to visualise assets map on stac browser . See the issue described in more details here: EOPF-Explorer/data-pipeline#105 (comment)

    @lhoupert @m-mohr Makes sense, I will implement it after the other PRs are solved and will follow the common metadata spec (https://github.com/radiantearth/stac-spec/blob/master/commons/common-metadata.md#statistics-object). According to existing conventions, e.g., what GDAL adds to the GeoTIFF header, the values refer to the used data type, so encoded values. not physical values (as you already discuss in EOPF-Explorer/data-pipeline#105 (comment)).

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

Metadata

Metadata

Labels

enhancementNew feature or requeststacSTAC metadata and items

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions