stac-utils / stac-utils/pystac

Implement `alternate` extension

Open
#593 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

extension help wanted
Dominant language
Python
Stars
463
Forks
134
Avg merge
10h
Merged PRs (30d)
4

Description

Add the alternate extension: https://github.com/stac-extensions/alternate-assets

Would be nice to have an easy way to to fetch an Asset that includes the alternate asset URL in place of the normal URL.

for example,

asset = item.get_asset('red', 's3')

And the asset returned has an href equal to the s3 URL rather than the original one from the asset.

In addition, alternate assets may contain fields from other extensions (e.g., storage), see:
https://ibhoyw8md9.execute-api.us-west-2.amazonaws.com/prod/collections/landsat-c2l1/items/LC08_L1TP_225099_20210731_20210731_02_T1

Those should be merged into the asset returned (overriding any existing property)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the item.get_asset entry point and read the linked alternate-assets extension specification, including its alternate fields. Done means selecting the requested alternate URL in the returned asset and merging alternate-asset fields, including fields from other extensions, with those values taking precedence.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend-api-design
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.