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: README.md
+16-7Lines changed: 16 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -71,18 +71,17 @@ name, e.g., `properties.datetime` or `datetime`.
71
71
72
72
## Include/Exclude Semantics
73
73
74
-
1. If `fields` attribute is specified as an empty object (for POST requests), an empty string (for GET requests),
75
-
or with both `include` and `exclude` set to null or an
76
-
empty array, then the recommended behavior is to include only fields
77
-
`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`.
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`.
78
77
These are the default fields to ensure a valid STAC Item is returned by default.
79
78
Implementations may choose to include other properties, e.g., `properties.created`, but the number
80
79
of default properties fields should be kept to a minimum.
81
80
2. If only `include` is specified, these fields should be the only fields included.
82
81
Any additional fields provided beyond those in the `include` list should be kept
83
82
to a minimum, as the caller has explicitly stated they do not need them.
84
-
3. If only `exclude` is specified, the specified fields fields should not be
85
-
included in the response Item entity, but every other field available for the
83
+
3. If only `exclude` is specified, the specified fields should not be
84
+
included, but every other field available for the
86
85
Item should be included.
87
86
4. If `exclude` is specified and `include` is null or an empty
88
87
array, then the `exclude` fields should be excluded from the default set.
@@ -97,7 +96,7 @@ example:
97
96
2. If a field is in `include`, and a nested field of that field is in `exclude`, the field
98
97
should be included, and the nested field should be excluded. For example,
99
98
if `properties` is included and `properties.datetime` is excluded, then
100
-
`datetime` should not be in `properties`.
99
+
`datetime` should not be in `properties`, but every other nested field should be.
101
100
6. If the same field is present in both `include` and `exclude`, it should be included.
102
101
103
102
### `null` vs. empty vs. missing
@@ -182,6 +181,8 @@ missing. For example, this is a case of `include` being empty (NOT missing):
182
181
183
182
## Examples
184
183
184
+
### Default fields
185
+
185
186
Return the default fields. This should return valid STAC Item entities.
186
187
187
188
Query Parameters
@@ -199,6 +200,8 @@ JSON
199
200
}
200
201
```
201
202
203
+
### Explicitly get a valid STAC Item
204
+
202
205
This has a similar effect as an empty object for `fields`, but it is up to the discretion of the implementation.
203
206
204
207
Query Parameters
@@ -226,6 +229,8 @@ JSON
226
229
}
227
230
```
228
231
232
+
### Exclude geometry
233
+
229
234
Exclude `geometry` from the full item. This will return an entity that is not a valid GeoJSON Feature or a valid STAC Item.
230
235
231
236
Query Parameters
@@ -246,6 +251,8 @@ JSON
246
251
}
247
252
```
248
253
254
+
### Minimal subset
255
+
249
256
Return the `id`, `type`, `geometry`, and the Properties field `eo:cloud_cover`.
250
257
This is not guaranteed not return a valid STAC Item, since not all required Item
251
258
fields are included, but an implementor may choose to return a valid STAC
@@ -272,6 +279,8 @@ JSON
272
279
}
273
280
```
274
281
282
+
### Exclude a nested fiels
283
+
275
284
To include `id` and all the properties fields, except for the `foo` field.
0 commit comments