Skip to content

Commit eb2ad79

Browse files
committed
Adds support for IAU codes.
1 parent fbba8a9 commit eb2ad79

File tree

4 files changed

+126
-7
lines changed

4 files changed

+126
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
## [v1.1.0] - 2023-02-10
1010

1111
### Added
12-
13-
- Added examples for Collections and Assets (in Items)
14-
15-
### Changed
12+
- Definition for authority and code instead of a hard coded EPSG. The EPSG code field was maintained for backwards compatibility.
1613

1714
- `proj:epsg` is not required in Item properties anymore. `proj:epsg` is recommended now, but not required in any scope.
1815
- Updated the PROJJSON schema to v0.5

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ The fields in the table below can be used in these parts of STAC documents:
3737

3838
| Field Name | Type | Description |
3939
| ---------------- | ------------------------ | ----------- |
40-
| proj:epsg | integer\|null | [EPSG code](http://www.epsg-registry.org/) of the datasource |
40+
| proj:code | integer\|null | **REQUIRED.** [EPSG code](http://www.epsg-registry.org/) or other code (e.g., [IAU](http://voparis-vespa-crs.obspm.fr:8080/web/2015.html)) of the datasource |
41+
| proj:authority | string\|null | The name of the authority that designated the proj:code of the datasource. Default: `epsg`. |
42+
| proj:epsg | integer\|null | [EPSG code](http://www.epsg-registry.org/) of the datasource; Maintained for backwards compatability. Please use `proj:authority` and `proj:code`. |
4143
| proj:wkt2 | string\|null | [WKT2](http://docs.opengeospatial.org/is/12-063r5/12-063r5.html) string representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:bbox` fields represent |
4244
| proj:projjson | [PROJJSON Object](https://proj.org/specifications/projjson.html)\|null | PROJJSON object representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:bbox` fields represent |
4345
| proj:geometry | [GeoJSON Geometry Object](https://tools.ietf.org/html/rfc7946#section-3.1) | Defines the footprint of this Item. |

examples/item_custom_proj.json

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
{
2+
"stac_version": "1.0.0-rc.1",
3+
"stac_extensions": [
4+
"https://stac-extensions.github.io/projection/v1.0.0/schema.json"
5+
],
6+
"type": "Feature",
7+
"id": "20201211_223832_CS2",
8+
"bbox": [
9+
172.91173669923782,
10+
1.3438851951615003,
11+
172.95469614953714,
12+
1.3690476620161975
13+
],
14+
"geometry": {
15+
"type": "Polygon",
16+
"coordinates": [
17+
[
18+
[
19+
172.91173669923782,
20+
1.3438851951615003
21+
],
22+
[
23+
172.95469614953714,
24+
1.3438851951615003
25+
],
26+
[
27+
172.95469614953714,
28+
1.3690476620161975
29+
],
30+
[
31+
172.91173669923782,
32+
1.3690476620161975
33+
],
34+
[
35+
172.91173669923782,
36+
1.3438851951615003
37+
]
38+
]
39+
]
40+
},
41+
"properties": {
42+
"datetime": "2020-12-11T22:38:32.125Z",
43+
"created": "2020-12-12T01:48:13.725Z",
44+
"updated": "2020-12-12T01:48:13.725Z",
45+
"platform": "cool_sat2",
46+
"instruments": [
47+
"cool_sensor_v1"
48+
],
49+
"gsd": 0.66,
50+
"proj:autority": "iau_2015",
51+
"proj:code": "49900",
52+
"proj:shape": [
53+
5558,
54+
9559
55+
],
56+
"proj:transform": [
57+
0.5,
58+
0,
59+
712710,
60+
0,
61+
-0.5,
62+
151406,
63+
0,
64+
0,
65+
1
66+
]
67+
},
68+
"links": [],
69+
"assets": {
70+
"analytic": {
71+
"href": "https://storage.googleapis.com/open-cogs/stac-examples/20201211_223832_CS2_analytic.tif",
72+
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
73+
"title": "4-Band Analytic",
74+
"roles": [
75+
"data"
76+
]
77+
},
78+
"thumbnail": {
79+
"href": "https://storage.googleapis.com/open-cogs/stac-examples/20201211_223832_CS2.jpg",
80+
"title": "Thumbnail",
81+
"type": "image/png",
82+
"roles": [
83+
"thumbnail"
84+
]
85+
},
86+
"visual": {
87+
"href": "https://storage.googleapis.com/open-cogs/stac-examples/20201211_223832_CS2.tif",
88+
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
89+
"title": "3-Band Visual",
90+
"roles": [
91+
"visual"
92+
]
93+
}
94+
}
95+
}

json-schema/schema.json

Lines changed: 27 additions & 2 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/projection/v1.1.0/schema.json",
3+
"$id": "https://stac-extensions.github.io/projection/v2.0.0/schema.json",
44
"title": "Projection Extension",
55
"description": "STAC Projection Extension for STAC Items.",
66
"$comment": "This schema succeeds if the proj: fields are not used at all, please keep this in mind.",
@@ -23,7 +23,17 @@
2323
"const": "Feature"
2424
},
2525
"properties": {
26-
"$ref": "#/definitions/fields"
26+
"allOf": [
27+
{
28+
"$comment": "Require fields here for item properties.",
29+
"required": [
30+
"proj:code"
31+
]
32+
},
33+
{
34+
"$ref": "#/definitions/fields"
35+
}
36+
]
2737
},
2838
"assets": {
2939
"type": "object",
@@ -85,6 +95,21 @@
8595
"fields": {
8696
"type": "object",
8797
"properties": {
98+
"proj:authority":{
99+
"title":"Authority granting the code",
100+
"type":[
101+
"string",
102+
"null"
103+
],
104+
"default":"epsg"
105+
},
106+
"proj:code":{
107+
"title":"Projection code",
108+
"type":[
109+
"integer",
110+
"null"
111+
]
112+
},
88113
"proj:epsg":{
89114
"title":"EPSG code",
90115
"type":[

0 commit comments

Comments
 (0)