Skip to content

Commit 78b1185

Browse files
committed
Add Web Map Links Extension
1 parent 8a847fb commit 78b1185

File tree

6 files changed

+176
-261
lines changed

6 files changed

+176
-261
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1616

1717
### Fixed
1818

19-
[Unreleased]: <https://github.com/stac-extensions/template/compare/v1.0.0...HEAD>
19+
## [1.0.0]
20+
21+
- Initial release for WMTS and XYZ.
22+
23+
[Unreleased]: <https://github.com/stac-extensions/web-map-links/compare/v1.0.0...HEAD>
24+
[1.0.0]: <https://github.com/stac-extensions/web-map-links/tree/v1.0.0>

README.md

Lines changed: 28 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,48 @@
1-
# Template Extension Specification
1+
# Web Map Links Extension Specification
22

3-
- **Title:** Template
4-
- **Identifier:** <https://stac-extensions.github.io/template/v1.0.0/schema.json>
5-
- **Field Name Prefix:** template
6-
- **Scope:** Item, Collection
3+
- **Title:** Web Map Links
4+
- **Identifier:** <https://stac-extensions.github.io/web-map-links/v1.0.0/schema.json>
5+
- **Field Name Prefix:** none, but each relation type has potentially a distinct prefix for additional data (e.g. `wmts`)
6+
- **Scope:** Item, Catalog, Collection
77
- **Extension [Maturity Classification](https://github.com/radiantearth/stac-spec/tree/master/extensions/README.md#extension-maturity):** Proposal
8-
- **Owner**: @your-gh-handles @person2
8+
- **Owner**: @m-mohr
99

10-
This document explains the Template Extension to the [SpatioTemporal Asset Catalog](https://github.com/radiantearth/stac-spec) (STAC) specification.
11-
This is the place to add a short introduction.
10+
This document explains the Web Map Links Extension to the
11+
[SpatioTemporal Asset Catalog](https://github.com/radiantearth/stac-spec) (STAC) specification.
12+
It allows to provide links to web maps for visualization purposes. Currently, OGC WMTS and XYZ are supported.
1213

1314
- Examples:
1415
- [Item example](examples/item.json): Shows the basic usage of the extension in a STAC Item
1516
- [Collection example](examples/collection.json): Shows the basic usage of the extension in a STAC Collection
1617
- [JSON Schema](json-schema/schema.json)
1718
- [Changelog](./CHANGELOG.md)
1819

19-
## Item Properties and Collection Fields
20+
## Link Object Fields
2021

21-
| Field Name | Type | Description |
22-
| -------------------- | ------------------------- | ----------- |
23-
| template:new_field | string | **REQUIRED**. Describe the required field... |
24-
| template:xyz | [XYZ Object](#xyz-object) | Describe the field... |
25-
| template:another_one | \[number] | Describe the field... |
22+
This extension only extends the [Link Object](https://github.com/radiantearth/stac-spec/tree/master/item-spec/item-spec.md#link-object)
23+
used in all STAC entities (Catalogs, Collections, Items). It requires specific relation types to be set for the `rel` field in the
24+
Link Object.
2625

27-
### Additional Field Information
26+
### OGC WMTS
2827

29-
#### template:new_field
28+
Links to a [OGC Web Map Tile Service](https://www.ogc.org/standards/wmts) (WMTS) implementation (versions 1.x).
3029

31-
This is a much more detailed description of the field `template:new_field`...
30+
| Field Name | Type | Description |
31+
| --------------- | -------------------- | ----------- |
32+
| rel | string | **REQUIRED**. Must be set to `wmts`. |
33+
| href | string | **REQUIRED**. Link to the WMTS, without any WMTS specific query parameters. |
34+
| wmts:layer | string\|\[string] | **REQUIRED**. The layers to show on the map, either a list of layer names or a single layer name. |
35+
| wmts:dimensions | Map\<string, string> | Any additional dimension parameters to add to the request, usually added as query parameters. |
3236

33-
### XYZ Object
37+
### XYZ
3438

35-
This is the introduction for the purpose and the content of the XYZ Object...
39+
Links to a XYZ, also known as slippy map.
3640

37-
| Field Name | Type | Description |
38-
| ----------- | ------ | ----------- |
39-
| x | number | **REQUIRED**. Describe the required field... |
40-
| y | number | **REQUIRED**. Describe the required field... |
41-
| z | number | **REQUIRED**. Describe the required field... |
42-
43-
## Relation types
44-
45-
The following types should be used as applicable `rel` types in the
46-
[Link Object](https://github.com/radiantearth/stac-spec/tree/master/item-spec/item-spec.md#link-object).
47-
48-
| Type | Description |
49-
| ------------------- | ----------- |
50-
| fancy-rel-type | This link points to a fancy resource. |
41+
| Field Name | Type | Description |
42+
| --------------- | -------------------- | ----------- |
43+
| rel | string | **REQUIRED**. Must be set to `xyz`. |
44+
| href | string | **REQUIRED**. Link to the XYZ as a templates URI. MUST include the following placeholders: `{x}`, `{y}` and `{z}`. MAY include a placeholder for the server: `{s}` |
45+
| xyz:servers | array | REQUIRED if `{s}` is used in the `href`. A list of allowed values for the placeholder `{s}`. |
5146

5247
## Contributing
5348

examples/collection.json

Lines changed: 21 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
2-
"stac_version": "1.0.0-rc.1",
2+
"stac_version": "1.0.0",
33
"stac_extensions": [
4-
"https://stac-extensions.github.io/item-assets/v1.0.0/schema.json",
5-
"https://stac-extensions.github.io/template/v1.0.0/schema.json"
4+
"https://stac-extensions.github.io/web-map-links/v1.0.0/schema.json"
65
],
76
"type": "Collection",
87
"id": "collection",
@@ -29,37 +28,6 @@
2928
]
3029
}
3130
},
32-
"template:new_field": "test",
33-
"template:xyz": {
34-
"x": 1,
35-
"y": 2,
36-
"z": 3
37-
},
38-
"template:another_one": [
39-
1,
40-
2,
41-
3
42-
],
43-
"assets": {
44-
"example": {
45-
"href": "https://example.com/examples/file.xyz",
46-
"template:new_field": "test"
47-
}
48-
},
49-
"item_assets": {
50-
"data": {
51-
"roles": [
52-
"data"
53-
],
54-
"template:new_field": "test"
55-
}
56-
},
57-
"summaries": {
58-
"datetime": {
59-
"minimum": "2015-06-23T00:00:00Z",
60-
"maximum": "2019-07-10T13:44:56Z"
61-
}
62-
},
6331
"links": [
6432
{
6533
"href": "https://example.com/examples/collection.json",
@@ -68,6 +36,25 @@
6836
{
6937
"href": "https://example.com/examples/item.json",
7038
"rel": "item"
39+
},
40+
{
41+
"href": "https://maps.example.com/wmts",
42+
"rel": "wmts",
43+
"title": "RGB composite visualized through a WMTS",
44+
"wmts:layer": "rgb",
45+
"wmts:dimensions": {
46+
"time": "2022-01-01"
47+
}
48+
},
49+
{
50+
"href": "https://{s}.maps.example.com/xyz/{z}/{x}/{y}",
51+
"rel": "xyz",
52+
"title": "RGB composite visualized through a XYZ",
53+
"xyz:servers": [
54+
"a",
55+
"b",
56+
"c"
57+
]
7158
}
7259
]
7360
}

examples/item.json

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"stac_version": "1.0.0-rc.1",
2+
"stac_version": "1.0.0",
33
"stac_extensions": [
4-
"https://stac-extensions.github.io/template/v1.0.0/schema.json"
4+
"https://stac-extensions.github.io/web-map-links/v1.0.0/schema.json"
55
],
66
"type": "Feature",
77
"id": "item",
@@ -56,6 +56,20 @@
5656
{
5757
"href": "https://example.com/examples/item.json",
5858
"rel": "self"
59+
},
60+
{
61+
"href": "https://maps.example.com/wmts",
62+
"rel": "wmts",
63+
"title": "RGB composite visualized through a WMTS",
64+
"wmts:layer": [
65+
"streets",
66+
"satellite"
67+
]
68+
},
69+
{
70+
"href": "https://maps.example.com/xyz/{z}/{x}/{y}",
71+
"rel": "xyz",
72+
"title": "RGB composite visualized through a XYZ"
5973
}
6074
],
6175
"assets": {

0 commit comments

Comments
 (0)