Cleaner slug generation through conventions #29
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Conventions:
catalog.json
collection.json
<id>.json
Unfortunately, these conventions fail to hold IRL. This is particularly problematic because there's no other way to determine what the source filename is (or path, in some cases).
CBERS is a very consistent catalog, but its collections (MUX, AWFI, PAN10M, PAN5M) double as 2nd-level catalogs (3).
The root sample Planet catalog doubles as a collection (3).
The Landsat catalog mostly works, although items are 2 levels deep and named as
<timestamp>/<id>.json
(4) and the timestamp throws things off.In other words, this approach doesn't work without some retooling of published catalogs (and I'm not clear that there's a path to doing this right, given the ambiguity of resolving filenames).
/cc @cholmes