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
-[`null` vs. empty vs. missing](#null-vs-empty-vs-missing)
6
7
-[Examples](#examples)
8
+
-[Default fields](#default-fields)
9
+
-[Explicitly get a valid STAC Item](#explicitly-get-a-valid-stac-item)
10
+
-[Exclude geometry](#exclude-geometry)
11
+
-[Minimal subset](#minimal-subset)
12
+
-[Exclude a nested fiels](#exclude-a-nested-fiels)
7
13
8
14
## Overview
9
15
@@ -71,29 +77,32 @@ name, e.g., `properties.datetime` or `datetime`.
71
77
72
78
## Include/Exclude Semantics
73
79
74
-
1. If `fields` attribute is specified as an empty string (GET requests) or as an empty object or an object with both `include` and `exclude` set to either null or an
75
-
empty array (for POST requests), then the recommended behavior is to include only fields
76
-
`type`, `stac_version`, `id`, `geometry`, `bbox`, `links`, `assets`, and `properties.datetime`. If `properties.datetime` is null, then it is recommended to include `properties.start_datetime` and `properties.end_datetime`.
77
-
These are the default fields to ensure a valid STAC Item is returned by default.
78
-
Implementations may choose to include other properties, e.g., `properties.created`, but the number
79
-
of default properties fields should be kept to a minimum.
80
+
1. If `fields` attribute is specified as an empty string (GET requests) or as an
81
+
empty object or an object with both `include` and `exclude` set to either null
82
+
or an empty array (for POST requests), then the recommended behavior is to include
83
+
only fields `type`, `stac_version`, `id`, `geometry`, `bbox`, `links`, `assets`,
84
+
and `properties.datetime`. If `properties.datetime` is null, then it is recommended
85
+
to include `properties.start_datetime` and `properties.end_datetime`.
86
+
These are the default fields to ensure a valid STAC Item is returned by default.
87
+
Implementations may choose to include other properties, e.g., `properties.created`,
88
+
but the number of default properties fields should be kept to a minimum.
80
89
2. If only `include` is specified, these fields should be the only fields included.
81
-
Any additional fields provided beyond those in the `include` list should be kept
82
-
to a minimum, as the caller has explicitly stated they do not need them.
90
+
Any additional fields provided beyond those in the `include` list should be kept
91
+
to a minimum, as the caller has explicitly stated they do not need them.
83
92
3. If only `exclude` is specified, the specified fields should not be
84
-
included, but every other field available for the
85
-
Item should be included.
93
+
included, but every other field available for the
94
+
Item should be included.
86
95
4. If `exclude` is specified and `include` is null or an empty
87
-
array, then the `exclude` fields should be excluded from the default set.
96
+
array, then the `exclude` fields should be excluded from the default set.
88
97
5. For nested fields (e.g., `properties.datetime`), the most specific path
89
-
should be honored first, and `include` should be preferred over `exclude`. For
90
-
example:
91
-
1. If a field is in `exclude`, and a nested field of that field is in
98
+
should be honored first, and `include` should be preferred over `exclude`. For
99
+
example:
100
+
1. If a field is in `exclude`, and a nested field of that field is in
92
101
`include`, the nested field should be included, but no other nested
93
102
fields in the field should be included. For example, if `properties` is
94
103
excluded and `properties.datetime` is included, then `datetime`
95
104
should be the only nested field in `properties`.
96
-
2. If a field is in `include`, and a nested field of that field is in `exclude`, the field
105
+
2. If a field is in `include`, and a nested field of that field is in `exclude`, the field
97
106
should be included, and the nested field should be excluded. For example,
98
107
if `properties` is included and `properties.datetime` is excluded, then
99
108
`datetime` should not be in `properties`, but every other nested field should be.
@@ -109,16 +118,16 @@ above](#includeexclude-semantics), but is summarized here for reference. "ALL"
109
118
means that all of the Item's fields should be returned; "DEFAULT" means the
110
119
default set (i.e. the required fields for a valid STAC Item) should be returned.
111
120
112
-
| include | exclude | returned |
113
-
| -- | -- | -- |
114
-
| missing, `null`, or empty | missing, `null`, or empty | DEFAULT |
115
-
|["a", "b"]| missing, `null`, or empty |["a", "b"]|
116
-
| missing |["a", "b"]| ALL except for ["a", "b"]|
117
-
|`null` or empty |["a", "b"]| DEFAULT except for ["a", "b"]|
118
-
|["a", "b"]|["a"]|["a", "b"]|
119
-
|["a"]|["a", "b"]|["a"]|
120
-
|["a.b"]|["a"]|`a.b` should be the only field in `a`|
121
-
|["a"]|["a.b"]|`a` should be included, but it should not include `a.b`|
0 commit comments