radiantearth / stac-spec

SpatioTemporal Asset Catalog specification - making geospatial assets openly searchable and crawlable
https://stacspec.org
Apache License 2.0
777 stars 178 forks source link

Globally unique item IDs in best practices #1157

Closed m-mohr closed 2 months ago

m-mohr commented 2 years ago

@gsf-sellis wrote on Gitter:

The item spec says that STAC ids are only unique within a collection. But the best practices page says "...existing providers can easily use their same ID when they translate their data into STAC - they just need to be sure it is globally unique, so may need a prefix." Do STAC ids need to be globally unique or only within a collection?

I think I might have found the source of the apparent discrepancy. In the collection spec it says:

"It is important that Collection identifiers are unique across the provider. And providers should strive as much as possible to make their Collection ids 'globally' unique, prefixing any common information with a unique string. This could be the provider's name if it is a fairly unique name, or their name combined with the domain they operate in."

https://github.com/radiantearth/stac-spec/blob/master/collection-spec/collection-spec.md

So in the best practices, maybe there is some conflation of the recommendation that collection ids be globally unique, while item ids have no such requirement or even recommendation?

m-mohr commented 2 years ago

I think we decided on a change in one the the RCs: Collection IDs should be globally unique, Item IDs should be unique per collection. I'm pretty sure we just did not manage to update all occurances properly, so we should update the best practices.