You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: best-practices.md
+18-14Lines changed: 18 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,8 +71,8 @@ So to enable all the great web tools (like [stacindex.org](http://stacindex.org)
71
71
[Google Cloud Storage](https://cloud.google.com/storage/docs/cross-origin), or [Apache Server](https://enable-cors.org/server_apache.html).
72
72
Many more are listed on [enable-cors.org](https://enable-cors.org/server.html). We recommend enabling CORS for all requests ('\*'),
73
73
so that diverse online tools can access your data. If you aren't sure if your server has CORS enabled you can use
74
-
[test-cors.org](https://www.test-cors.org/). Enter the URL of your STAC root [Catalog](catalog-spec/catalog-spec.md)JSON
75
-
and make sure it gets a response.
74
+
[test-cors.org](https://www.test-cors.org/). Enter the URL of your STAC root [Catalog](catalog-spec/catalog-spec.md)or
75
+
[Collection](collection-spec/collection-spec.md) JSON and make sure it gets a response.
76
76
77
77
### STAC on the Web
78
78
@@ -81,7 +81,7 @@ surprised that there is nothing about HTML in the entire specification. This is
81
81
should be on web pages without ending up with very bad looking pages. But the importance of having web-accessible versions
82
82
of every STAC Item is paramount.
83
83
84
-
The main recommendation is to have an HTML page for every single STAC Itemand Catalog. They should be visually pleasing,
84
+
The main recommendation is to have an HTML page for every single STAC Item, Catalog and Collection. They should be visually pleasing,
85
85
crawlable by search engines and ideally interactive. The current best practice is to use a tool in the STAC ecosystem called
86
86
[STAC Browser](https://github.com/radiantearth/stac-browser/). It can crawl most any valid STAC implementation and generate unique web
87
87
pages for each Item and Catalog (or Collection). While it has a default look and feel, the design can easily be
@@ -393,6 +393,10 @@ file that just has the bands needed for display
393
393
394
394
## Catalog & Collection Practices
395
395
396
+
*Note: This section uses the term 'Catalog' (with an uppercase C) to refer to the JSON entity specified in the
397
+
[Catalog spec](catalog-spec/catalog-spec.md), and 'catalog' (with a lowercase c) to refer to any full STAC implementation,
398
+
which can be any mix of Catalogs Collections and Items.*
399
+
396
400
### Static and Dynamic Catalogs
397
401
398
402
As mentioned in the main [overview](overview.md), there are two main types of catalogs - static
@@ -446,7 +450,7 @@ providers, and users could browse down to both. The leaf Items should just be li
446
450
447
451
### Catalog Layout
448
452
449
-
Creating a catalog involves a number of decisions as to what folder structure to use to represent sub-catalogs, items
453
+
Creating a catalog involves a number of decisions as to what folder structure to use to represent sub-catalogs, Items
450
454
and assets, and how to name them. The specification leaves this totally open, and you can link things as you want. But
451
455
it is recommended to be thoughtful about the organization of sub-catalogs, putting them into a structure that a person
452
456
might reasonably browse (since they likely will with [STAC on the Web](#stac-on-the-web) recommendations). For example
@@ -463,14 +467,14 @@ if you follow these recommendations.
463
467
1. Root documents (Catalogs / Collections) should be at the root of a directory tree containing the static catalog.
464
468
2. Catalogs should be named `catalog.json` and Collections should be named `collection.json`.
465
469
3. Items should be named `<id>.json`.
466
-
4. Sub-Catalogs should be stored in subdirectories of their parent
470
+
4. Sub-Catalogs or sub-Collections should be stored in subdirectories of their parent
467
471
(and only 1 subdirectory deeper than a document's parent, e.g. `.../sample/sub1/catalog.json`).
468
-
5. Items should be stored in subdirectories of their parent Catalog.
469
-
This means that each Item and its assets are contained in a unique subdirectory.
470
-
6. Limit the number of Items in a Catalog or sub-Catalog, grouping / partitioning as relevant to the dataset.
472
+
5. Items should be stored in subdirectories of their parent Catalog or Collection.
473
+
This means that each Item and its assets are contained in a unique subdirectory.
474
+
6. Limit the number of Items in a Catalog or Collection, grouping / partitioning as relevant to the dataset.
471
475
7. Use structural elements (Catalog and Collection) consistently across each 'level' of your hierarchy.
472
476
For example, if levels 2 and 4 of the hierarchy only contain Collections,
473
-
don't add a Catalog at levels 2 and 4.
477
+
don't add a Catalog at levels 2 and 4.
474
478
475
479
#### Dynamic Catalog Layout
476
480
@@ -483,7 +487,7 @@ different sub-catalog organization structures. For example one catalog could div
483
487
by providers, and users could browse down to both. The leaf Items should just be linked to in a single canonical location
484
488
(or at least use a rel link that indicates the location of the canonical one). It is recommended that dynamic catalogs
485
489
provide multiple 'views' to allow users to navigate in a way that makes sense to them, providing multiple 'sub-catalogs'
486
-
from the root Catalog that enable different paths to browse (country/state, date/time, constellation/satellite, etc). But the
490
+
from the root that enable different paths to browse (country/state, date/time, constellation/satellite, etc). But the
487
491
canonical 'rel' link should be used to designate the primary location of the Item to search engine crawlers.
488
492
489
493
#### Mixing STAC Versions
@@ -608,9 +612,9 @@ implement it.
608
612
#### Relative Published Catalog
609
613
610
614
This is a self-contained catalog as described above, except it includes an absolute `self` link at
611
-
the root catalog, to identify its online location. This is designed so that a self-contained catalog (of either type, with its
615
+
the root to identify its online location. This is designed so that a self-contained catalog (of either type, with its
612
616
assets or just metadata) can be 'published' online
613
-
by just adding one field (the self link) to its root catalog. All the other links should remain the same. The resulting catalog
617
+
by just adding one field (the self link) to its root (Catalog or Collection). All the other links should remain the same. The resulting catalog
614
618
is no longer compliant with the self-contained catalog recommendations, but instead transforms into a 'relative published catalog'.
615
619
With this, a client may resolve Item and sub-catalog self links by traversing parent and root links, but requires reading
616
620
multiple sources to achieve this.
@@ -632,8 +636,8 @@ a number of the common official relations that are used in production STAC imple
632
636
| alternate | It is recommended that STAC Items are also available as HTML, and should use this rel with `"type" : "text/html"` to tell clients where they can get a version of the Item or Collection to view in a browser. See [STAC on the Web in Best Practices](#stac-on-the-web) for more information. |
633
637
| canonical | The URL of the [canonical](https://en.wikipedia.org/wiki/Canonical_link_element) version of the Item or Collection. API responses and copies of catalogs should use this to inform users that they are direct copy of another STAC Item, using the canonical rel to refer back to the primary location. |
634
638
| via | The URL of the source metadata that this STAC Item or Collection is created from. Used similarly to canonical, but refers back to a non-STAC record (Landsat MTL, Sentinel tileInfo.json, etc) |
635
-
| prev | Indicates that the link's context is a part of a series, and that the previous in the series is the link target. Typically used in STAC by API's, to return smaller groups of Items or Catalogs. |
636
-
| next | Indicates that the link's context is a part of a series, and that the next in the series is the link target. Typically used in STAC by API's, to return smaller groups of Items or Catalogs. |
639
+
| prev | Indicates that the link's context is a part of a series, and that the previous in the series is the link target. Typically used in STAC by API's, to return smaller groups of Items or Catalogs/Collections. |
640
+
| next | Indicates that the link's context is a part of a series, and that the next in the series is the link target. Typically used in STAC by API's, to return smaller groups of Items or Catalogs/Collections. |
Copy file name to clipboardExpand all lines: catalog-spec/catalog-spec.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,8 +36,9 @@ and fields to be compliant.
36
36
This Catalog specification primarily defines a structure for information to be discoverable. Any use
37
37
that is publishing a set of related spatiotemporal assets is strongly recommended to also use the
38
38
STAC Collection specification to provide additional information about the set of Items
39
-
contained in a Catalog, in order to give contextual information to aid in discovery. Every STAC Collection is
40
-
also a valid STAC Catalog.
39
+
contained in a Catalog, in order to give contextual information to aid in discovery.
40
+
STAC Collections all have the same fields as STAC Catalogs, but with different allowed
41
+
values for `type` and `stac_extensions`.
41
42
42
43
## Catalog fields
43
44
@@ -89,11 +90,11 @@ The following types are commonly used as `rel` types in the Link Object of a STA
89
90
| ------- | ----------- |
90
91
| self | STRONGLY RECOMMENDED. *Absolute* URL to the location that the Catalog file can be found online, if available. This is particularly useful when in a download package that includes metadata, so that the downstream user can know where the data has come from. |
91
92
| root | STRONGLY RECOMMENDED. URL to the root STAC Catalog or [Collection](../collection-spec/README.md). Catalogs should include a link to their root, even if it's the root and points to itself. |
92
-
| parent | URL to the parent STAC Catalog or Collection. Non-root Catalogs should include a link to their parent. |
93
-
| child | URL to a child STAC Catalog or Collection. |
93
+
| parent | URL to the parent STAC entity (Catalog or Collection). Non-root Catalogs should include a link to their parent. |
94
+
| child | URL to a child STAC entity (Catalog or Collection). |
94
95
| item | URL to a STAC Item. |
95
96
96
-
**Note:** A link to at least one `item` or `child` Catalog is **REQUIRED**.
97
+
**Note:** A link to at least one `item` or `child`(Catalog or Collection) is **REQUIRED**.
97
98
98
99
There are additional `rel` types in the [Using Relation Types](../best-practices.md#using-relation-types) best practice, but as
99
100
they are more typically used in Collections, as Catalogs tend to just be used to structure STAC organization, so tend to just use
| self | STRONGLY RECOMMENDED. *Absolute* URL to the location that the Collection file can be found online, if available. This is particularly useful when in a download package that includes metadata, so that the downstream user can know where the data has come from. |
255
-
| root | URL to the root STAC Catalog or Collection. Collections should include a link to their root, even if it's the root and points to itself. |
256
-
| parent | URL to the parent STAC Catalog or Collection. Non-root Collections should include a link to their parent. |
257
-
| child | URL to a child STAC Catalog or Collection. |
255
+
| root | URL to the root STAC entity (Catalog or Collection). Collections should include a link to their root, even if it's the root and points to itself. |
256
+
| parent | URL to the parent STAC entity (Catalog or Collection). Non-root Collections should include a link to their parent. |
257
+
| child | URL to a child STAC entity (Catalog or Collection). |
258
258
| item | URL to a STAC Item. All Items linked from a Collection MUST refer back to its Collection with the [`collection` relation type](../item-spec/item-spec.md#relation-types). |
259
259
| license | The license URL(s) for the Collection SHOULD be specified if the `license` field is set to `proprietary` or `various`. If there is no public license URL available, it is RECOMMENDED to put the license text in a separate file and link to this file. |
260
260
| derived_from | URL to a STAC Collection that was used as input data in the creation of this Collection. See the note in [STAC Item](../item-spec/item-spec.md#derived_from) for more info. |
| self | STRONGLY RECOMMENDED. *Absolute* URL to the Item if it is available at a public URL. This is particularly useful when in a download package that includes metadata, so that the downstream user can know where the data has come from. |
195
-
| root | URL to the root STAC Catalog or Collection. |
196
-
| parent | URL to the parent STAC Catalog or Collection. |
195
+
| root | URL to the root STAC entity (Catalog or Collection). |
196
+
| parent | URL to the parent STAC entity (Catalog or Collection). |
197
197
| collection | STRONGLY RECOMMENDED. URL to a Collection. *Absolute* URLs should be used whenever possible. The referenced Collection is STRONGLY RECOMMENDED to implement the same STAC version as the Item. A link with this `rel` type is *required* if the `collection` field in properties is present. |
198
198
| derived_from | URL to a STAC Item that was used as input data in the creation of this Item. |
0 commit comments