Skip to content

Commit 0e872d1

Browse files
authored
fix grid code prefix regex (#5)
* fix grid code prefix regex
1 parent 0374d54 commit 0e872d1

File tree

6 files changed

+73
-16
lines changed

6 files changed

+73
-16
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16
1+
18

CHANGELOG.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## [Unreleased]
7+
## [1.1.0]
88

9-
### Added
9+
### Fixed
1010

11-
### Changed
11+
- Text describes code prefix as alphanumeric and WGS1 and WGS2 are specified for Landsat, but
12+
schema only allows A-Z in the prefix. This has been fixed to allow \[A-Z0-9]
1213

13-
### Deprecated
14+
## 1.0.0
1415

15-
### Removed
16+
### Added
1617

17-
### Fixed
18+
- Initial release
1819

19-
[Unreleased]: <https://github.com/stac-extensions/grid/compare/v1.0.0...HEAD>
20+
[1.1.0]: <https://github.com/stac-extensions/grid/compare/v1.0.0...v1.1.0>

examples/item.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"stac_version": "1.0.0",
33
"stac_extensions": [
4-
"https://stac-extensions.github.io/grid/v1.0.0/schema.json"
4+
"https://stac-extensions.github.io/grid/v1.1.0/schema.json"
55
],
66
"type": "Feature",
77
"id": "item",

examples/landsat_item.json

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"stac_version": "1.0.0",
3+
"stac_extensions": [
4+
"https://stac-extensions.github.io/grid/v1.1.0/schema.json"
5+
],
6+
"type": "Feature",
7+
"id": "item",
8+
"bbox": [
9+
172.9,
10+
1.3,
11+
173,
12+
1.4
13+
],
14+
"geometry": {
15+
"type": "Polygon",
16+
"coordinates": [
17+
[
18+
[
19+
172.9,
20+
1.3
21+
],
22+
[
23+
173,
24+
1.3
25+
],
26+
[
27+
173,
28+
1.4
29+
],
30+
[
31+
172.9,
32+
1.4
33+
],
34+
[
35+
172.9,
36+
1.3
37+
]
38+
]
39+
]
40+
},
41+
"properties": {
42+
"datetime": "2020-12-11T22:38:32Z",
43+
"grid:code": "WGS2-150134"
44+
},
45+
"links": [
46+
{
47+
"href": "https://example.com/examples/item.json",
48+
"rel": "self"
49+
}
50+
],
51+
"assets": {
52+
"data": {
53+
"href": "https://example.com/examples/file.xyz"
54+
}
55+
}
56+
}

json-schema/schema.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
3-
"$id": "https://stac-extensions.github.io/grid/v1.0.0/schema.json#",
3+
"$id": "https://stac-extensions.github.io/grid/v1.1.0/schema.json#",
44
"title": "Grid Extension",
55
"description": "STAC Grid Extension for STAC Items.",
66
"oneOf": [
@@ -48,7 +48,7 @@
4848
"stac_extensions": {
4949
"type": "array",
5050
"contains": {
51-
"const": "https://stac-extensions.github.io/grid/v1.0.0/schema.json"
51+
"const": "https://stac-extensions.github.io/grid/v1.1.0/schema.json"
5252
}
5353
}
5454
}
@@ -63,7 +63,7 @@
6363
"properties": {
6464
"grid:code": {
6565
"type": "string",
66-
"pattern": "^[A-Z]+-[-_.A-Za-z0-9]+$"
66+
"pattern": "^[A-Z0-9]+-[-_.A-Za-z0-9]+$"
6767
}
6868
},
6969
"patternProperties": {

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
"scripts": {
55
"test": "npm run check-markdown && npm run check-examples",
66
"check-markdown": "remark . -f -r .github/remark.yaml",
7-
"check-examples": "stac-node-validator . --lint --verbose --schemaMap https://stac-extensions.github.io/grid/v1.0.0/schema.json=./json-schema/schema.json",
8-
"format-examples": "stac-node-validator . --format --schemaMap https://stac-extensions.github.io/grid/v1.0.0/schema.json=./json-schema/schema.json"
7+
"check-examples": "stac-node-validator . --lint --verbose --schemaMap https://stac-extensions.github.io/grid/v1.1.0/schema.json=./json-schema/schema.json",
8+
"format-examples": "stac-node-validator . --format --schemaMap https://stac-extensions.github.io/grid/v1.1.0/schema.json=./json-schema/schema.json"
99
},
1010
"dependencies": {
11-
"remark-cli": "^10.0.1",
11+
"remark-cli": "^11.0.0",
1212
"remark-lint": "^9.1.1",
1313
"remark-lint-no-html": "^3.1.1",
1414
"remark-preset-lint-consistent": "^5.1.1",
1515
"remark-preset-lint-markdown-style-guide": "^5.1.2",
1616
"remark-preset-lint-recommended": "^6.1.2",
17-
"remark-validate-links": "^11.0.2",
17+
"remark-validate-links": "^12.1.0",
1818
"stac-node-validator": "^1.2.2"
1919
}
2020
}

0 commit comments

Comments
 (0)