Skip to content

Commit 4988a40

Browse files
authored
Merge pull request #868 from radiantearth/dev
1.0.0-beta.2 release
2 parents 5d0ad6c + 5b556f8 commit 4988a40

File tree

89 files changed

+711
-368
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+711
-368
lines changed

.circleci/config.yml

+27-2
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,34 @@ jobs:
3535
- run:
3636
name: validate
3737
command: npm run check-markdown
38+
publish_schemas:
39+
working_directory: ~/stac
40+
docker:
41+
- image: circleci/node:12
42+
steps:
43+
- checkout
44+
- run:
45+
name: install
46+
command: npm install
47+
- add_ssh_keys:
48+
fingerprints:
49+
- "9b:0a:88:ff:12:d1:29:9a:ff:bb:72:ab:7d:81:df:59"
50+
- run:
51+
name: publish
52+
command: npm run publish-schemas -- $CIRCLE_TAG
3853
workflows:
3954
version: 2
40-
test:
55+
ci:
4156
jobs:
4257
- test_examples
43-
- test_docs
58+
- test_docs
59+
- publish_schemas:
60+
requires:
61+
- test_examples
62+
filters:
63+
tags:
64+
# All (future) tags
65+
only: /.+/
66+
branches:
67+
# Only dev branch, not PRs
68+
only: dev

.circleci/publish-schemas.js

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
const klaw = require('klaw-sync');
2+
const path = require('path');
3+
const fs = require('fs');
4+
const ghpages = require('gh-pages');
5+
6+
function filterFn (item) {
7+
const basename = path.basename(item.path);
8+
return basename === '.' || basename === 'node_modules' || basename[0] !== '.';
9+
}
10+
11+
let args = process.argv.slice(2);
12+
let tag = 'dev';
13+
if (args.length && args[0].trim().length > 0) {
14+
tag = args[0];
15+
}
16+
17+
var folder = '.';
18+
var jsonSchemaFolderPattern = path.sep + 'json-schema' + path.sep;
19+
for (let file of klaw(folder, {filter: filterFn})) {
20+
if (file.path.includes(jsonSchemaFolderPattern) && path.extname(file.path) === '.json') {
21+
let source = file.path;
22+
let target = 'schemas' + path.sep + tag + path.sep + path.relative(folder, file.path);
23+
fs.mkdirSync(path.dirname(target), { recursive: true });
24+
fs.copyFileSync(source, target);
25+
console.log(target);
26+
}
27+
}
28+
29+
ghpages.publish('schemas/' + tag, {
30+
src: '**',
31+
dest: tag,
32+
message: 'Publish JSON Schemas [ci skip]',
33+
user: {
34+
name: 'STAC CI',
35+
email: 'ci@stacspec.org'
36+
}
37+
}, error => {
38+
console.error(error ? error : 'Deployed to gh-pages');
39+
process.exit(error ? 1 : 0);
40+
});

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,6 @@ typings/
6464
# IntelliJ IDEA files
6565
.idea/
6666
*.iml
67+
68+
# Folder created when CI puhlishes JSON Schemas
69+
schemas/

CHANGELOG.md

+26
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,31 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
66

77
## [Unreleased]
88

9+
### Added
10+
11+
### Changed
12+
13+
### Removed
14+
15+
### Fixed
16+
17+
18+
## [v1.0.0-beta.2] - 2020-07-08
19+
20+
### Added
21+
- JSON-schema file in the Point Cloud extension.
22+
23+
### Changed
24+
- Clarification on null geometries, making bbox not required if a null geometry is used.
25+
- Multiple extents (bounding boxes / intervals) are allowed per Collection
26+
27+
### Removed
28+
- Validation instructions
29+
30+
### Fixed
31+
- Fixed several JSON Schemas
32+
- Fixed examples
33+
934
## [v1.0.0-beta.1] - 2020-05-29
1035

1136
### Removed
@@ -333,6 +358,7 @@ Thanks @hgs-msmith, @matthewhanson, @hgs-trutherford, @rouault, @joshfix, @alkam
333358

334359

335360
[Unreleased]: <https://github.com/radiantearth/stac-spec/compare/master...dev>
361+
[v1.0.0-beta.2]: <https://github.com/radiantearth/stac-spec/compare/v1.0.0-beta.1..v1.0.0-beta.2>
336362
[v1.0.0-beta.1]: <https://github.com/radiantearth/stac-spec/compare/v0.9.0...v1.0.0-beta.1>
337363
[v0.9.0]: <https://github.com/radiantearth/stac-spec/compare/v0.8.1...v0.9.0>
338364
[v0.8.1]: <https://github.com/radiantearth/stac-spec/compare/v0.8.0...v0.8.1>

CONTRIBUTING.md

+2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ system. Please use `check-markdown` locally, as described in the [next section](
3737
to ensure that the checks on the pull request succeed. If it does not then you can look at the
3838
mistakes online, which are the same as running `check-markdown` locally would surface.
3939

40+
All pull requests that modify or create JSON schema files or examples should use [JSON formatter](https://jsonformatter.org/) to keep files consistent across the repo.
41+
4042
All pull requests additionally require a review of two STAC core team members. Releases are cut
4143
from dev to master (and require 3 approvals), see the [process](process.md) document for more details.
4244

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@ in a 'beta' state, with no major changes anticipated, so implementors can expect
2323
at this point we don't anticipate any major changes, but reserve the right to make them if we get feedback that something just doesn't
2424
work. Which is to say the next couple months are a great time to implement STAC, as your changes will be head. After 1.0 our goal
2525
is to not change the core in any backwards incompatible way for a very long time, if ever, so that people can build on this until
26-
JSON is no longer relevant.
26+
JSON is no longer relevant. The STAC specification follows [Semantic Versioning](https://semver.org/), so once 1.0.0 is reached any breaking
27+
change will require the spec to go to 2.0.0.
2728

2829
## Current version and branches
2930

3031
The [master branch](https://github.com/radiantearth/stac-spec/tree/master) is the 'stable' version of the spec. It is currently version
31-
**1.0.0-beta.1** of the specification. The
32+
**1.0.0-beta.2** of the specification. The
3233
[dev](https://github.com/radiantearth/stac-spec/tree/dev) branch is where active development takes place, and may have inconsistent examples.
3334
Whenever dev stabilizes a release is cut and we merge dev in to master. So master should be stable at any given time.
3435
It is possible that there may be small releases in quick succession, especially if they are nice improvements that do
@@ -44,7 +45,7 @@ the specification takes place in the [issue tracker](https://github.com/radiante
4445

4546
## In this Repository
4647

47-
This repository contains the core specifications plus examples and validation schemas and tools. Also included are a
48+
This repository contains the core specifications plus examples and validation schemas. Also included are a
4849
few documents that provide more context and plans for the evolution of the specification. Each spec folder contains a
4950
README explaining the layout of the folder, the main specification document, examples, and validating schemas. And
5051
there is one more specification in the STAC 'family', which is

best-practices.md

+40
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* [Field and ID formatting](#field-and-id-formatting)
66
* [Field selection and Metadata Linking](#field-selection-and-metadata-linking)
77
* [Datetime selection](#datetime-selection)
8+
* [Unlocated Items](#unlocated-items)
89
* [Representing Vector Layers in STAC](#representing-vector-layers-in-stac)
910
* [Common Use Cases of Additional Fields for Assets](#common-use-cases-of-additional-fields-for-assets)
1011
* [Static and Dynamic Catalogs](#static-and-dynamic-catalogs)
@@ -69,6 +70,45 @@ might choose to have `datetime` be the start. The key is to put in a date and ti
6970
the focus of STAC. If `datetime` is set to `null` then it is strongly recommended to use it in conjunction with a content extension
7071
that explains why it should not be set for that type of data.
7172

73+
## Unlocated Items
74+
75+
Though the [GeoJSON standard](https://tools.ietf.org/html/rfc7946) allows null geometries, in STAC we strongly recommend
76+
that every item have a geometry, since the general expectation of someone using a SpatioTemporal Catalog is to be able to query
77+
all data by space and time. But there are some use cases where it can make sense to create a STAC Item before it gets
78+
a geometry. The most common of these is 'level 1' satellite data, where an image is downlinked and cataloged before it has
79+
been geospatially located.
80+
81+
The recommendation for data that does not yet have a location is to follow the GeoJSON concept that it is an ['unlocated'
82+
feature](https://tools.ietf.org/html/rfc7946#section-3.2). So if the catalog has data that is not located then it can follow
83+
GeoJSON and set the geometry to null. Though normally required, in this case the `bbox` field should not be included.
84+
85+
Note that this recommendation is only for cases where data does not yet have a geometry and it cannot be estimated. There
86+
are further details on the two most commonly requested desired use cases for setting geometry to null:
87+
88+
### Unrectified Satellite Data
89+
90+
Most satellite data is downlinked without information that precisely describes where it is located on earth. A satellite
91+
imagery processing pipeline will always attempt to locate it, but often that process takes a number of hours, or never
92+
quite completes (like when it is too cloudy). It can be useful to start to populate the Item before it has a geometry.
93+
In this case the recommendation is to use the 'estimated' position from the satellite, to populate at least the bounding box,
94+
and use the same broad bounds for the geometry (or leaving it null) until there is precise ground lock. This estimation is
95+
usually done by onboard equipment, like GPS or star trackers, but can be off by kilometers or more. But it is very useful for
96+
STAC users to be able to at least find approximate area in their searches. A commonly used field for communicating ground lock
97+
is not yet established, but likely should be (an extension proposal would be appreciated). If there is no way to provide an
98+
estimate then the data then a null geometry with no `bbox` can be used, as described above. But the data will likely not
99+
show up in STAC API searches, as most will at least implicitly use a geometry. Though this section is written with
100+
satellite data in mind, one can easily imagine other data types that start with a less precise geometry but have it
101+
refined after processing.
102+
103+
### Data that is not spatial
104+
105+
The other case that often comes up is people who love STAC and want to use it to catalog everything they have, even if it is
106+
not spatial. This use case is not currently supported by STAC, as we are focused on data that is both temporal and spatial
107+
in nature. The [OGC API - Records](https://github.com/opengeospatial/ogcapi-records) is an emerging standard that likely
108+
will be able to handle a wider range of data to catalog than STAC. It builds on [OGC API -
109+
Features](https://github.com/opengeospatial/ogcapi-features) just like [STAC API](https://github.com/radiantearth/stac-api-spec/)
110+
does. The [collection assets extension](extensions/collection-assets) may also provide an option for some use cases.
111+
72112
## Representing Vector Layers in STAC
73113

74114
Many implementors are tempted to try to use STAC for 'everything', using it as a universal catalog of all their 'stuff'.

catalog-spec/README.md

-4
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ contains a full sample catalog.
2626
**Schemas:** The schemas to validate the core Catalog definition are found in the *[json-schema/](json-schema/)* folder.
2727
The primary one is *[catalog.json](json-schema/catalog.json)*.
2828

29-
## Schema Validation
30-
31-
Instruction on schema validation for STAC Catalog can be found in the [validation instructions](../validation/README.md).
32-
3329
## Catalog Evolution
3430

3531
The Catalog specification is maturing, but it is still relatively early days. The core of Catalog has been defined very

catalog-spec/catalog-spec.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ also a valid STAC Catalog.
3636
| description | string | **REQUIRED.** Detailed multi-line description to fully explain the catalog. [CommonMark 0.29](http://commonmark.org/) syntax MAY be used for rich text representation. |
3737
| links | [[Link Object](#link-object)] | **REQUIRED.** A list of references to other documents. |
3838

39-
**stac_extensions**: A list of extensions the Catalog implements. This does NOT declare the extensions of children or Items. The list contains URLs to the JSON Schema files it can be validated against. For official [content extensions](../extensions/README.md#list-of-content-extensions), a "shortcut" can be used. This means you can specify the folder name of the extension, for example `pointcloud` for the Point Cloud extension. This does *not* apply for API extensions. If the versions of the extension and the catalog diverge, you can specify the URL of the JSON schema file.
39+
**stac_extensions**: A list of extensions the Catalog implements. This does NOT declare the extensions of children or Items. The list contains URLs to the JSON Schema files it can be validated against. For official [content extensions](../extensions/README.md#list-of-content-extensions), a "shortcut" can be used. This means you can specify the folder name of the extension, for example `single-file-stac` for the Point Cloud extension. If the versions of the extension and the catalog diverge, you can specify the URL of the JSON schema file.
4040
This list must only contain extensions that extend the Catalog itself, see the the 'Scope' column in the list of extensions.
4141

4242
### Link Object

catalog-spec/examples/catalog-items.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"stac_version": "1.0.0-beta.1",
2+
"stac_version": "1.0.0-beta.2",
33
"id": "hurricane-harvey-0831",
44
"title": "Hurricane Harvey 08-31-2017",
55
"description": "Planet Scenes and Composites for Hurricane Harvey on Aug 31, 2017",

catalog-spec/examples/catalog.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"stac_version": "1.0.0-beta.1",
2+
"stac_version": "1.0.0-beta.2",
33
"id": "NAIP",
44
"description": "Catalog of NAIP Imagery",
55
"links": [

catalog-spec/json-schema/catalog.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
3-
"$id": "catalog.json#",
3+
"$id": "https://schemas.stacspec.org/v1.0.0-beta.2/catalog-spec/json-schema/catalog.json#",
44
"title": "STAC Catalog Specification",
55
"description": "This object represents Catalogs in a SpatioTemporal Asset Catalog.",
66
"allOf": [
@@ -22,7 +22,7 @@
2222
"stac_version": {
2323
"title": "STAC version",
2424
"type": "string",
25-
"const": "1.0.0-beta.1"
25+
"const": "1.0.0-beta.2"
2626
},
2727
"stac_extensions": {
2828
"title": "STAC extensions",

collection-spec/README.md

-4
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ structures and fields.
2525
**Schemas:** The schemas to validate the STAC Collection definition are found in the
2626
*[json-schema/](json-schema/)* folder. The primary one is *[collection.json](json-schema/collection.json)*.
2727

28-
## Schema Validation
29-
30-
Instruction on schema validation for STAC Items can be found in the [validation instructions](../validation/README.md).
31-
3228
## Collection Flexibility
3329

3430
STAC Collections are defined for flexibility. They only require a handful of fields, and

0 commit comments

Comments
 (0)