The best practices on https://github.com/radiantearth/stac-spec/blob/v1.0.0/best-practices.md#use-of-links seem partially ambiguous and may have evolved a bit.
We have the following in the best practices:
- Self-contained Catalogs: no self link, STAC links relative, assets absolute or relative
- Self-contained Metadata Only: same as above, but assets absolute
- Self-contained with Assets: same as above, but assets relative
- Published Catalogs
- Absolute Published Catalog: absolute self link in all files, STAC links and assets absolute
- Relative Published Catalog: absolute self link in root file, STAC links and assets relative (but it doesn't require a root link in all files, which is not optimal?!)
The approach that I recommend is:
- Absolute self link in all files
- Relative STAC links
- Relative assets unless hosted externally
STAC Browser also recommends what I recommend (unsurprisingly ;-) ) or the Absolute published catalog. Those two generally work best for STAC Browser as it can generate absolute self links for an entity without requesting the root via additional request. It seems that this type is not reflected in the best practices though. I feel like the best practices should evolve a bit and may even be simplified.
The cases above come up very naturally, the difference is usually the self links. Everything else should just be consistently being used for STAC links and assets. Depending on the given hosting context the assets are also often just absolute.
Thoughts? Otherwise, I'll try to create a PR soon...
The best practices on https://github.com/radiantearth/stac-spec/blob/v1.0.0/best-practices.md#use-of-links seem partially ambiguous and may have evolved a bit.
We have the following in the best practices:
The approach that I recommend is:
STAC Browser also recommends what I recommend (unsurprisingly ;-) ) or the Absolute published catalog. Those two generally work best for STAC Browser as it can generate absolute self links for an entity without requesting the root via additional request. It seems that this type is not reflected in the best practices though. I feel like the best practices should evolve a bit and may even be simplified.
The cases above come up very naturally, the difference is usually the self links. Everything else should just be consistently being used for STAC links and assets. Depending on the given hosting context the assets are also often just absolute.
Thoughts? Otherwise, I'll try to create a PR soon...