From 17cd3768c7530e88921deb19051ea8a38a8ef3eb Mon Sep 17 00:00:00 2001 From: Chris Holmes Date: Tue, 23 Feb 2021 19:54:21 -0800 Subject: [PATCH 1/3] added to catalog layout for consistent levels --- CHANGELOG.md | 1 + best-practices.md | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bac193b3e..9221c8071 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - 'summaries' are now available in the Catalog spec, so both catalogs and collections can make use of it. ([#903](https://github.com/radiantearth/stac-spec/issues/903)) - Recommendation to enable CORS - A 'visual' option as an asset role. +- Added a best practice recommendation to keep collections at consistent levels. ### Changed diff --git a/best-practices.md b/best-practices.md index f11573f62..514393450 100644 --- a/best-practices.md +++ b/best-practices.md @@ -265,7 +265,8 @@ keep the size of each sub-catalog under a megabyte. If your sub-catalog lists te should consider an additional way to break it up. We encourage people to explore new structures of linking data, but the following list is what a number of implementors -ended up doing. Following these recommendations makes for more legible catalogs. +ended up doing. Following these recommendations makes for more legible catalogs, and many tools operate more efficiently +if you follow these recommendations. 1. Root documents (catalogs / collections) should be at the root of a directory tree containing the static catalog. 2. Catalogs that are not also Collections should be named `catalog.json` and Collections should be named `collection.json`. @@ -274,6 +275,9 @@ ended up doing. Following these recommendations makes for more legible catalogs. 5. Items should be stored in subdirectories of their parent catalog. This means that each item and its assets are contained in a unique subdirectory. 6. Limit the number of items in a catalog or sub-catalog, grouping / partitioning as relevant to the dataset. +7. In a nested hierarchy of catalogs and collections make the different levels 'homogeneous' - all catalogs or all collections. +This means if you have a catalog (level 1) that links to 5 collections (level 2) that each link to more catalogs (level 3) that +link to items and catalogs then you should only add more collections at level 2, and only catalogs at level 1, 3 and beyond. ### Dynamic Catalog Layout From c70964388a1c0546385e014ae31d6669c4cf24b9 Mon Sep 17 00:00:00 2001 From: Chris Holmes Date: Mon, 1 Mar 2021 20:59:30 -0800 Subject: [PATCH 2/3] attempted rewrite --- best-practices.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/best-practices.md b/best-practices.md index d7229562c..c7c3dac8b 100644 --- a/best-practices.md +++ b/best-practices.md @@ -405,9 +405,8 @@ if you follow these recommendations. 5. Items should be stored in subdirectories of their parent Catalog. This means that each Item and its assets are contained in a unique subdirectory. 6. Limit the number of Items in a Catalog or sub-Catalog, grouping / partitioning as relevant to the dataset. -7. In a nested hierarchy of catalogs and collections make the different levels 'homogeneous' - all catalogs or all collections. -This means if you have a catalog (level 1) that links to 5 collections (level 2) that each link to more catalogs (level 3) that -link to items and catalogs then you should only add more collections at level 2, and only catalogs at level 1, 3 and beyond. +7. Use structural elements (Catalog and Collection) consistently across each 'level' of your hierarchy. If levels 2 and 4 +have are both only Collections then don't add a Catalog there (and vice versa), or else change every element at that level. #### Dynamic Catalog Layout From 3af0a276b3109acb14065f232c9eb39558754433 Mon Sep 17 00:00:00 2001 From: Chris Holmes Date: Tue, 2 Mar 2021 07:11:25 -0800 Subject: [PATCH 3/3] Update best-practices.md Co-authored-by: Rob Emanuele --- best-practices.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/best-practices.md b/best-practices.md index c7c3dac8b..5bb1f59a3 100644 --- a/best-practices.md +++ b/best-practices.md @@ -405,8 +405,8 @@ if you follow these recommendations. 5. Items should be stored in subdirectories of their parent Catalog. This means that each Item and its assets are contained in a unique subdirectory. 6. Limit the number of Items in a Catalog or sub-Catalog, grouping / partitioning as relevant to the dataset. -7. Use structural elements (Catalog and Collection) consistently across each 'level' of your hierarchy. If levels 2 and 4 -have are both only Collections then don't add a Catalog there (and vice versa), or else change every element at that level. +7. Use structural elements (Catalog and Collection) consistently across each 'level' of your hierarchy. For example, if levels 2 and 4 of the hierarchy only contain Collections, +don't add a Catalog at levels 2 and 4. #### Dynamic Catalog Layout