Skip to content

Commit 24ec4a2

Browse files
committed
added best practice to include title, updated examples
1 parent 7363844 commit 24ec4a2

File tree

11 files changed

+58
-26
lines changed

11 files changed

+58
-26
lines changed

best-practices.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,11 @@ if you follow these recommendations.
483483
For example, if levels 2 and 4 of the hierarchy only contain Collections,
484484
don't add a Catalog at levels 2 and 4.
485485

486+
One further recommendation to help tools is to always include the 'title' field when including a link, especially in the
487+
`item`, `child`, `parent` and `root` links, even if it repeats several times. This should be the same as the 'title' in the
488+
link destination. Having this enables clients to display a nice human readable name of the link without having to open the
489+
link destination.
490+
486491
#### Dynamic Catalog Layout
487492

488493
While these recommendations were primarily written for [static catalogs](#static-catalogs), they apply

examples/catalog.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"id": "examples",
33
"type": "Catalog",
4+
"title": "Example Catalog",
45
"stac_version": "1.0.0-rc.4",
56
"description": "This catalog is a simple demonstration of an example catalog that is used to organize a hierarchy of collections and their items.",
67
"links": [

examples/collection-only/collection-with-schemas.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,15 @@
3333
"links": [
3434
{
3535
"rel": "parent",
36-
"href": "../catalog.json"
36+
"href": "../catalog.json",
37+
"type": "application/json",
38+
"title": "Example Catalog"
3739
},
3840
{
3941
"rel": "root",
40-
"href": "../catalog.json"
42+
"href": "../catalog.json",
43+
"type": "application/json",
44+
"title": "Example Catalog"
4145
},
4246
{
4347
"rel": "license",

examples/collection-only/collection.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,11 +214,15 @@
214214
"links": [
215215
{
216216
"rel": "parent",
217-
"href": "../catalog.json"
217+
"href": "../catalog.json",
218+
"type": "application/json",
219+
"title": "Example Catalog"
218220
},
219221
{
220222
"rel": "root",
221-
"href": "../catalog.json"
223+
"href": "../catalog.json",
224+
"type": "application/json",
225+
"title": "Example Catalog"
222226
},
223227
{
224228
"rel": "license",

examples/collection.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@
8282
{
8383
"rel": "root",
8484
"href": "./collection.json",
85-
"type": "application/json"
85+
"type": "application/json",
86+
"title": "Simple Example Collection"
8687
},
8788
{
8889
"rel": "item",

examples/collectionless-item.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,22 +75,26 @@
7575
{
7676
"rel": "root",
7777
"href": "./catalog.json",
78-
"type": "application/json"
78+
"type": "application/json",
79+
"title": "Example Catalog"
7980
},
8081
{
8182
"rel": "parent",
8283
"href": "./catalog.json",
83-
"type": "application/json"
84+
"type": "application/json",
85+
"title": "Example Catalog"
8486
},
8587
{
8688
"rel": "alternate",
8789
"type": "text/html",
88-
"href": "http://cool-sat.com/catalog/CS3-20160503_132130_04/CS3-20160503_132130_04.html"
90+
"href": "http://cool-sat.com/catalog/CS3-20160503_132130_04/CS3-20160503_132130_04.html",
91+
"title": "HTML representation of this STAC Item"
8992
},
9093
{
9194
"rel": "license",
9295
"type": "text/html",
93-
"href": "http://remotedata.io/license.html"
96+
"href": "http://remotedata.io/license.html",
97+
"title": "Data License for Remote Data, Inc."
9498
}
9599
],
96100
"assets": {

examples/core-item.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,20 @@
6363
{
6464
"rel": "root",
6565
"href": "./collection.json",
66-
"type": "application/json"
66+
"type": "application/json",
67+
"title": "Simple Example Collection"
6768
},
6869
{
6970
"rel": "parent",
7071
"href": "./collection.json",
71-
"type": "application/json"
72+
"type": "application/json",
73+
"title": "Simple Example Collection"
7274
},
7375
{
7476
"rel": "alternate",
7577
"type": "text/html",
76-
"href": "http://remotedata.io/catalog/20201211_223832_CS2/index.html"
78+
"href": "http://remotedata.io/catalog/20201211_223832_CS2/index.html",
79+
"title": "HTML version of this STAC Item"
7780
}
7881
],
7982
"assets": {

examples/extended-item.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,17 +91,20 @@
9191
{
9292
"rel": "root",
9393
"href": "./collection.json",
94-
"type": "application/json"
94+
"type": "application/json",
95+
"title": "Simple Example Collection"
9596
},
9697
{
9798
"rel": "parent",
9899
"href": "./collection.json",
99-
"type": "application/json"
100+
"type": "application/json",
101+
"title": "Simple Example Collection"
100102
},
101103
{
102104
"rel": "alternate",
103105
"type": "text/html",
104-
"href": "http://remotedata.io/catalog/20201211_223832_CS2/index.html"
106+
"href": "http://remotedata.io/catalog/20201211_223832_CS2/index.html",
107+
"title": "HTML version of this STAC Item"
105108
}
106109
],
107110
"assets": {

examples/extensions-collection/collection.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,17 @@
44
"stac_version": "1.0.0-rc.4",
55
"description": "A heterogenous collection containing deeper examples of various extensions",
66
"links": [
7+
{
8+
"rel": "parent",
9+
"href": "../catalog.json",
10+
"type": "application/json",
11+
"title": "Example Catalog"
12+
},
713
{
814
"rel": "root",
915
"href": "../catalog.json",
10-
"type": "application/json"
16+
"type": "application/json",
17+
"title": "Example Catalog"
1118
},
1219
{
1320
"rel": "item",
@@ -18,11 +25,6 @@
1825
"rel": "license",
1926
"href": "https://remotedata.io/license.html",
2027
"title": "Remote Data License Terms"
21-
},
22-
{
23-
"rel": "parent",
24-
"href": "../catalog.json",
25-
"type": "application/json"
2628
}
2729
],
2830
"stac_extensions": [],

examples/extensions-collection/proj-example/proj-example.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,17 +213,20 @@
213213
{
214214
"rel": "root",
215215
"href": "../../catalog.json",
216-
"type": "application/json"
216+
"type": "application/json",
217+
"title": "Example Catalog"
217218
},
218219
{
219220
"rel": "parent",
220221
"href": "../collection.json",
221-
"type": "application/json"
222+
"type": "application/json",
223+
"title": "Collection of Extension Items"
222224
},
223225
{
224226
"rel": "collection",
225227
"href": "../collection.json",
226-
"type": "application/json"
228+
"type": "application/json",
229+
"title": "Collection of Extension Items"
227230
}
228231
],
229232
"assets": {

0 commit comments

Comments
 (0)