stac-utils / pystac

Python library for working with any SpatioTemporal Asset Catalog (STAC)

Home Page:https://pystac.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Customize child links

m-mohr opened this issue · comments

If I add a child link to a catalog, there's no easy way to customize it (i.e. add an additional property). The created Link object is completely hidden from the users and getting it via a get_child_links or similar fundtions is cumbersome.

I could imagine two ways:

  1. Add an extra_fields parameter to add_child
  2. Return the created link object (instead of None) so that we can add more fields to the link

Thoughts? Happy to create a PR, but would like to get some thoughts from the maintainers first.

Return the created link object (instead of None) so that we can add more fields to the link

This feels the most intuitive to me.

Thanks, I'll create a PR that applies this behavior.