|
8 | 8 | - [Endpoints](#endpoints) |
9 | 9 | - [Example Landing Page for STAC API - Core](#example-landing-page-for-stac-api---core) |
10 | 10 | - [Extensions](#extensions) |
11 | | - - [Structuring Catalog Hierarchies](#structuring-catalog-hierarchies) |
12 | 11 |
|
13 | 12 | ## Summary |
14 | 13 |
|
@@ -135,13 +134,6 @@ advertised. All service descriptions provided as part of the STAC API spec use O |
135 | 134 | easily be used to return either YAML or JSON from this endpoint. OAFeat does not currently define a conformance |
136 | 135 | class for OpenAPI 3.1, but may in the future. |
137 | 136 |
|
138 | | -If sub-catalogs are used, it is **recommended** that these use the endpoint `/catalogs/{catalogId}` to avoid conflicting |
139 | | -with other endpoints from the root. |
140 | | - |
141 | | -| **Endpoint** | **Media Type** | **Returns** | **Description** | |
142 | | -| ----------------------- | ---------------- | ---------------------------------------------- | -------------------- | |
143 | | -| `/catalogs/{catalogId}` | application/json | [Catalog](../stac-spec/catalog-spec/README.md) | child Catalog object | |
144 | | - |
145 | 137 | ## Example Landing Page for STAC API - Core |
146 | 138 |
|
147 | 139 | This JSON is what would be expected from an API that only implements *STAC API - Core*. It is a valid STAC Catalog |
@@ -203,141 +195,3 @@ different conformance classes and a different set of links. |
203 | 195 | ## Extensions |
204 | 196 |
|
205 | 197 | STAC API Extensions can be found at [stac-api-extensions.github.io](https://stac-api-extensions.github.io). |
206 | | - |
207 | | -## Structuring Catalog Hierarchies |
208 | | - |
209 | | -A STAC API is more useful when it presents a complete `Catalog` representation of all the data contained in the |
210 | | -API, such that all `Item` objects can be reached by traversing `child` and `item` link relations from |
211 | | -the root. Being able to reach all Items in this way is formalized in the |
212 | | -Browseable conformance class, but any Catalog can be structured for hierarchical traversal. |
213 | | -Implementers who have search as their primary use case should consider also implementing this |
214 | | -alternate view over the data by presenting it as a directed graph of catalogs, where the `child` link relations typically |
215 | | -form a tree, and where each catalog can be retrieved with a single request (e.g., each Catalog JSON is small enough that |
216 | | -it does not require pagination). |
217 | | - |
218 | | -For example, child links to sub-catalogs may be structured as in this diagram: |
219 | | - |
220 | | -```mermaid |
221 | | -graph LR |
222 | | - A[Root] -->|child| B(sentinel-2-l2a) |
223 | | - B --> |child| C(10SDG) |
224 | | - B --> |child| D(10SDH) |
225 | | - B --> |child| E(10SDJ) |
226 | | - B --> |child| BB(...) |
227 | | -
|
228 | | - C --> |child| F(2018) |
229 | | - C --> |child| G(2019) |
230 | | - C --> |child| CC(...) |
231 | | -
|
232 | | - D --> |child| H(2018) |
233 | | - D --> |child| DD(...) |
234 | | - E --> |child| I(2018) |
235 | | - E --> |child| EE(...) |
236 | | -
|
237 | | - F --> |item| J(12.31.0) |
238 | | - F --> |item| K(01.09.0) |
239 | | - F --> |item| L(01.09.1) |
240 | | - F --> |item| FF(...) |
241 | | -``` |
242 | | - |
243 | | -STAC API does not define what endpoint or endpoints should returns these catalogs, but approach would be |
244 | | -to return them from an endpoint like `/catalogs/{catalogId}`. |
245 | | - |
246 | | -While OAFeat requires that all Items must be part of a Collection, this does not mean that the Collection needs to be |
247 | | -part of the browseable tree. If they are part of the tree, it is recommended that there only be one Collection in a |
248 | | -path through the tree, and that a collection never contain child collections. |
249 | | - |
250 | | -These are the two standard ways of structuring a browseable tree of catalogs, the only difference being |
251 | | -whether the Collection is used as part of the tree or not: |
252 | | - |
253 | | -- Catalog (root) -> Catalog* -> Item (recommended) |
254 | | -- Catalog (root) -> Collection -> Catalog* -> Item |
255 | | - |
256 | | -All items must be part of a Collection, but the Collection itself does not need to be part of the browsable graph. |
257 | | - |
258 | | -How you structure your graph of Catalogs can allow you to both group Collections together and create sub-groups |
259 | | -of items within a Collection. |
260 | | -For example, your collections may be grouped so each represent a data product. This might mean |
261 | | -you have a collection for each of Landsat 8 Collection 1, Landsat 8 Surface Reflectance, Sentinel-2 L1C, Sentinel-2 |
262 | | -L2A, Sentinel-5P UV Aerosol Index, Sentinel-5P Cloud, MODIS MCD43A4, MODIS MOD11A1, and MODIS MYD11A1. You can also |
263 | | -present each of these as a catalog, and create parent catalogs for them that allow you to group together all Landsat, Sentinel, and MODIS catalogs. |
264 | | - |
265 | | -- / root catalog |
266 | | - - child -> /catalogs/landsat |
267 | | - - child -> /catalogs/landsat_7 |
268 | | - - child -> /catalogs/landsat_8 |
269 | | - - child -> /catalogs/landsat_8_c1 |
270 | | - - child -> /catalogs/landsat_8_sr |
271 | | - - child -> /catalogs/sentinel |
272 | | - - child -> /catalogs/sentinel_2 |
273 | | - - child -> /catalogs/sentinel_2_l1c |
274 | | - - child -> /catalogs/sentinel_2_l2a |
275 | | - - child -> /catalogs/sentinel_5p |
276 | | - - child -> /catalogs/sentinel_5p_uvai |
277 | | - - child -> /catalogs/sentinel_5p_cloud |
278 | | - - child -> /catalogs/modis |
279 | | - - child -> /catalogs/modis_mcd43a4 |
280 | | - - child -> /catalogs/modis_mod11a1 |
281 | | - - child -> /catalogs/modis_myd11a1 |
282 | | - |
283 | | -Each of these catalog endpoints could in turn be its own STAC API root, allowing an interface where users can |
284 | | -search over arbitrary groups of collections without needing to explicitly know and name every collection in the |
285 | | -search `collection` query parameter. These catalogs-of-catalogs can be separated multiple ways, e.g. be |
286 | | -per provider (e.g., Sentinel-2), per domain (e.g., cloud data), or per form of data (electro-optical, LIDAR, SAR). |
287 | | - |
288 | | -Going the other direction, collections can be sub-grouped into smaller catalogs. For example, this example |
289 | | -groups a catalog of Landsat 8 Collection 1 items by path, row, and date (the path/row system is used by this |
290 | | -product for gridding). |
291 | | - |
292 | | -- / (root) |
293 | | - - /catalogs/landsat_8_c1 |
294 | | - - /catalogs/landsat_8_c1/139 |
295 | | - - /catalogs/landsat_8_c1/139_045 |
296 | | - - /catalogs/landsat_8_c1/139_045_20170304 |
297 | | - - /collections/landsat_8_c1/items/LC08_L1TP_139045_20170304_20170316_01_T1 |
298 | | - - /catalogs/landsat_8_c1/139_045_20170305 |
299 | | - - /collections/landsat_8_c1/items/LC08_L1TP_139045_20170305_20170317_01_T1 |
300 | | - - /catalogs/landsat_8_c1/139_046 |
301 | | - - /catalogs/landsat_8_c1/139_046_20170304 |
302 | | - - /collections/landsat_8_c1/items/LC08_L1TP_139046_20170304_20170316_01_T1 |
303 | | - - /catalogs/landsat_8_c1/139_046_20170305 |
304 | | - - /collections/landsat_8_c1/items/LC08_L1TP_139046_20170305_20170317_01_T1 |
305 | | - |
306 | | -If done in a consistent manner, these can also provide "templated" URIs, such that a user could directly request a |
307 | | -specific path, row, and date simply by replacing the values in `/catalogs/landsat_8_c1/{path}_{row}_{date}`. |
308 | | - |
309 | | -Similarly, a MODIS product using sinusoidal gridding could use paths of the form |
310 | | -`/{horizontal_grid}/{vertical_grid}/{date}`. Since only around 300 scenes produced every day for a MODIS product |
311 | | -and there is a 20 year history of production, these could be fit in a graph with path length 3 from the root |
312 | | -Catalog to each leaf Item. |
313 | | - |
314 | | -- / (root) |
315 | | - - `/catalogs/mcd43a4` (~7,000 `child` relation links, one to each date) |
316 | | - - `/catalogs/mcd43a4/{date}` (~300 `item` relation links to each Item) |
317 | | - - `/collections/mcd43a4/items/{itemId}` |
318 | | - - ... |
319 | | - |
320 | | -Catalogs can also group related products. For example, here we group together synthetic aperture radar (SAR) products |
321 | | -(Sentinel-1 and AfriSAR) and electro-optical (EO) bottom of atmosphere (BOA) products. |
322 | | - |
323 | | -- / root catalog |
324 | | - - child -> /catalogs/sar |
325 | | - - child -> /catalogs/sentinel_1_l2a |
326 | | - - child -> /catalogs/afrisar |
327 | | - - child -> /catalogs/eo_boa |
328 | | - - child -> /catalogs/landsat_8_sr |
329 | | - - child -> /catalogs/sentinel_2_l2a |
330 | | - |
331 | | -The catalogs structure is a directed graph that allows |
332 | | -you to provide numerous different Catalog and Collection graphs to reach leaf Items. For example, for a Landsat 8 data |
333 | | -product, you may want to allow browsing both by date then path then row, or by path then row then date: |
334 | | - |
335 | | -1. Catalog -> Catalog (product) -> Catalog (date) -> Catalog (path) -> Catalog (row) |
336 | | -2. Catalog -> Catalog (product) -> Catalog (path) -> Catalog (row) -> Catalog (date) |
337 | | - |
338 | | -When more than path to an Item is allowed, it is recommended that the final `item` link relation reference a |
339 | | -consistent, canonical URL for each item, instead of a URL that is specific to the path of Catalog that was followed |
340 | | -to reach it. |
341 | | - |
342 | | -There are many options for how to structure these catalog graphs, so it will take some analysis work to figure out |
343 | | -which one or ones best match the structure of your data and the needs of your consumers. |
0 commit comments