Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify parent link in Features context #362

Closed
m-mohr opened this issue Nov 29, 2022 · 5 comments
Closed

Clarify parent link in Features context #362

m-mohr opened this issue Nov 29, 2022 · 5 comments
Assignees
Labels
Milestone

Comments

@m-mohr
Copy link
Collaborator

m-mohr commented Nov 29, 2022

As far as I know the parent links in the context of STAC API - Features must always be pointing to valid Catalogs or Collections.
So the parent links must be as follows:

  • parent of /collections/:collectionid/items/:itemid must be /collections/:collectionid
  • parent of /collections/:collectionid/items must be /collections/:collectionid
  • parent of /collections/:collectionid must be /
  • parent of /collections must be /

I often see items pointing to .../items and collections to /collections. I think we should clarify this.

@philvarner
Copy link
Collaborator

I've added documentation to clarify these two:

  • parent of /collections/:collectionid must be /
  • parent of /collections/:collectionid/items/:itemid must be /collections/:collectionid

I made it clear in the table that these two do not have parent links:

  • parent of /collections/:collectionid/items must be /collections/:collectionid
  • parent of /collections must be /

in OAFeat, /collections/:collectionid/items has a link rel collection so that it's not confused the the parent-child relation. We could add something similar to /collections (catalog?), but there's already root which points to the same link.

@philvarner philvarner self-assigned this Jan 17, 2023
@tschaub
Copy link
Collaborator

tschaub commented Mar 7, 2023

The item spec includes this requirement:

An Item must also provide a link to the STAC Collection using the collection relation type

Then in STAC API, the link from an item to its collection has the parent relation type.

I think STAC Browser assumes the link from item to collection will have the collection relation. Not sure what else makes this assumption.

Should this be parent or collection?

@philvarner
Copy link
Collaborator

collection is the right relation if you want to definitely find the Collection. The parent link may link to a parent Catalog the Item is in (though in practice, none of the STAC API impls have sub-Catalog support yet, so it's just root Catalog -> Collections -> Items).

@tschaub
Copy link
Collaborator

tschaub commented Mar 7, 2023

Thanks for the clarification, @philvarner. I've opened #404 proposing that collection be used instead of parent for links from an item to its collection.

@philvarner
Copy link
Collaborator

It's not instead of though -- they're frequently the same (and always the same in all the STAC API impls I know of), but they don't have to be the same -- collection will always point to the Collection resource, but parent may not point to the collection, but might point to a parent Catalog.

I think we need to add to the definitions that there should be a collection link rel (as defined by STAC) in addition to parent (defined by STAC API)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants