Skip to content

Commit 9b00b3c

Browse files
committed
Swap reference and forecast datetime #7 + minor adjustments #1
1 parent 2d615f8 commit 9b00b3c

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

README.md

+10-8
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ It defines some high-level fields to get a basic understanding of **weather** fo
1212
Some fields may also be applicable for climate forecast data, but it hasn't been written specifically for that domain.
1313

1414
- Examples:
15-
- [Item example](examples/item.json): Shows the basic usage of the extension in a STAC Item (todo)
16-
- [Collection example](examples/collection.json): Shows the basic usage of the extension in a STAC Collection (todo)
15+
- [Item example for an specific time](examples/item.json): An example STAC Item for a forecast covering a specific instance in time (todo)
16+
- [Item example for a period](examples/item-period.json): An example STAC Item for a forecast covering a period of time (todo)
17+
- [Collection example](examples/collection.json): Shows the usage of the extension in a STAC Collection (todo)
1718
- [JSON Schema](json-schema/schema.json) (todo)
1819
- [Changelog](./CHANGELOG.md) (todo)
1920

@@ -28,20 +29,21 @@ The fields in the table below can be used in these parts of STAC documents:
2829

2930
| Field Name | Type | Description |
3031
| ---------------------------- | ------ | ----------- |
31-
| forecast:datetime | string | The forecast datetime, which must be in UTC. It is formatted according to [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6). |
32-
| forecast:horizon | string | The time between the reference datetime and the forecast datetime. Formatted as [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations), e.g. `PT6H` for a 6-hour forecast. |
33-
| forecast:accumulation_period | string | If the forecast is not only for a specific instance in time but instead is for an accumulation over a certain period you can specify the length here.Formatted as [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations), e.g. `PT3H` for a 3-hour accumulation. If not given, assumes that the forecast is for an instance in time as if this was set to `P0TS` (0 seconds). |
34-
35-
One of the fields `forecast:datetime` or `forecast:horizon` is **REQUIRED**!
32+
| forecast:reference_datetime | string | **REQUIRED.** The *reference* datetime, which must be in UTC. It is formatted according to [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6). |
33+
| forecast:horizon | string | **REQUIRED.** The time between the reference datetime and the forecast datetime. Formatted as [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations), e.g. `PT6H` for a 6-hour forecast. |
34+
| forecast:accumulation_period | string | If the forecast is not only for a specific instance in time but instead is for a certain period, you can specify the length here. Formatted as [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations), e.g. `PT3H` for a 3-hour accumulation. If not given, assumes that the forecast is for an instance in time as if this was set to `PT0S` (0 seconds). |
3635

3736
### Additional Fields from other extensions
3837

3938
| Field Name | Type | Description |
4039
| ----------------- | ------ | ----------- |
41-
| datetime | string | **REQUIRED.** The reference datetime. It follows the definition in the [STAC Common Metdata](https://github.com/radiantearth/stac-spec/blob/master/item-spec/common-metadata.md#date-and-time). Alternatively, `start_datetime` and `end_datetime` can also be used. |
40+
| datetime | string | **REQUIRED.** The forecast datetime. It follows the definition in the [STAC Common Metdata](https://github.com/radiantearth/stac-spec/blob/master/item-spec/common-metadata.md#date-and-time). If the forecast is not only for a specific instance in time but instead is for a certain period, you should use `start_datetime` and `end_datetime` and set `datetime` to `null`. |
41+
| start_datetime / end_datetime | string | The forecast start and end datetime. It follows the definition in the [STAC Common Metdata](https://github.com/radiantearth/stac-spec/blob/master/item-spec/common-metadata.md#date-and-time). Only use these fields if the forecast is for a period (and as such `forecast:accumulation_period` is not `PT0S`). |
4242
| expires | string | The datetime until the forecast is valid or gets superseded by a new forecast. It follows the definition in the [Timestamps Extension](https://github.com/stac-extensions/timestamps#item-properties-fields). |
4343
| deprecated | string | Set this to `true` if a newer version of the forecast is available. It follows the definition in the [Version Extension](https://github.com/stac-extensions/timestamps#item-properties-fields). |
4444

45+
**Note:** The fields mentioned above don't use the `forecast:` prefix!
46+
4547
It is also recommended to implement the [Version Extension](https://github.com/stac-extensions/version)
4648
and use it to "deprecate" old forecasts and link between them using the given
4749
[relation types](https://github.com/stac-extensions/version#relation-types).

0 commit comments

Comments
 (0)