You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+34-10Lines changed: 34 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@ This document explains the Web Map Links Extension to the
12
12
It allows to provide links to web map services for visualization purposes.
13
13
14
14
The following services are supported:
15
+
15
16
-[3D Tiles](#3d-tiles)
16
17
-[OGC WMS](#ogc-wms)
17
18
-[OGC WMTS](#ogc-wmts)
@@ -20,6 +21,7 @@ The following services are supported:
20
21
-[XYZ](#xyz)
21
22
22
23
Important resources in this extension:
24
+
23
25
- Examples:
24
26
-[Item example](examples/item.json): Shows the basic usage of the extension in a STAC Item
25
27
-[Collection example](examples/collection.json): Shows the basic usage of the extension in a STAC Collection
@@ -77,19 +79,43 @@ Links to a [OGC Web Map Tile Service](https://www.ogc.org/standards/wmts) (WMTS)
77
79
| href | string |**REQUIRED**. Link to the WMTS, without any WMTS specific query parameters. |
78
80
| type | string | The media type to be used for the tile requests, e.g. `image/png` or `image/jpeg`. |
79
81
| href:servers|\[string]| See [href:servers](#hrefservers) below for details. |
80
-
| wmts:layer| string\|\[string]|**REQUIRED**. The layers to show on the map by default, either a list of layer names or a single layer name. |
81
-
| wmts:dimensions| Map\<string, string> | Any additional dimension parameters to add to the request as key-value-pairs, usually added as query parameters. |
82
+
| wmts:dimensions| Map\<string, string> | Any additional parameters for the request (see below). |
83
+
| wmts:encoding|string| Either `kvp` (see [KVP](#kvp)) or `rest` (see [REST](#rest)). Defaults to `KVP`. |
82
84
83
-
If you provide multiple array elements in `wmts:layer` (e.g. `["layerA", "layerB"]`),
84
-
each should occur in a separate layer in the mapping library so that individual requests for the layers are sent.
85
+
The `href` can contain an optional server placeholder `{s}`. If `{s}` is used, the field [`href:servers`](#hrefservers) MUST be provided.
86
+
87
+
#### KVP
85
88
86
-
#### href
89
+
This describes the key-value-pair (KVP) request encoding,
90
+
which uses query parameters to transmit additional parameters.
87
91
88
-
For WMTS, the `href` is pointing to the URL of the Capabilities document, but without the query parameters for the Capabilities request.
| wmts:encoding| string | If provided, must be set to `kvp`. |
95
+
| wmts:layer| string\|\[string]|**REQUIRED**. The layers to show on the map by default, either a list of layer names or a single layer name. Will be added to the request as a query parameter. |
96
+
| wmts:dimensions| Map\<string, string> | Any additional dimension parameters to add to the request as key-value-pairs (i.e. query parameters). |
97
+
98
+
**href**: For the KVP request encoding, the `href` is pointing to the URL of the Capabilities document, but without the query parameters for the Capabilities request.
89
99
So if your Capabilities can be requested from `https://example.com/geoserver/service/wmts?service=wmts&request=GetCapabilities`
90
100
you'd provide `https://example.com/geoserver/service/wmts` as `href`.
91
101
92
-
The `href` can contain an optional server placeholder `{s}`. If `{s}` is used, the field [`href:servers`](#hrefservers) MUST be provided.
102
+
**wmts:layer**: If you provide multiple array elements in `wmts:layer` (e.g. `["layerA", "layerB"]`),
103
+
each should occur in a separate layer in the mapping library so that individual requests for the layers are sent.
104
+
105
+
#### REST
106
+
107
+
This describes the REST request encoding, which provides a URL template with variables.
| wmts:encoding| string |**REQUIRED**. Must be set to `rest`. |
112
+
| variables | Map\<string, \*> | This object contains one key per substitution variable in the templated URL. |
113
+
114
+
**href**: For the REST request encoding, the `href` is a URL template. Variables with a constant value should be encoded directly in the URL without using a variable.
115
+
116
+
**variables**: Each key defines the schema of one substitution variable using a JSON Schema fragment and can thus include things like the data type of the variable, enumerations, minimum values, maximum values, etc.
117
+
Note that clients may have varying capabilities to parse and hanle the schemas provided for the variables.
118
+
If you want to ensure that the WMTS can be easily read, stick to very simply schemas (e.g., enums for strings, minimum/maximum values for numbers).
93
119
94
120
### PMTiles
95
121
@@ -119,9 +145,7 @@ Links to a XYZ, also known as slippy map.
119
145
| type | string | Recommended to be set to the image file type the XYZ returns by default, usually `image/png` or `image/jpeg`. |
120
146
| href:servers|\[string]| See [href:servers](#hrefservers) below for details. |
121
147
122
-
#### href
123
-
124
-
For XYZ, the `href` is a templated URI.
148
+
**href**: For XYZ, the `href` is a templated URI.
125
149
It MUST include the following placeholders: `{x}`, `{y}` and `{z}` and MAY include a placeholder for the server: `{s}`.
126
150
If `{s}` is used, the field [`href:servers`](#hrefservers) MUST be provided.
127
151
All other parameters should be [hard-coded](https://github.com/stac-extensions/web-map-links/issues/2) with specific values,
Copy file name to clipboardExpand all lines: json-schema/schema.json
+52-25Lines changed: 52 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -70,38 +70,65 @@
70
70
}
71
71
},
72
72
"then": {
73
-
"required": [
74
-
"wmts:layer"
73
+
"allOf": [
74
+
{
75
+
"$ref": "#/definitions/servers"
76
+
}
75
77
],
76
-
"properties": {
77
-
"wmts:layer": {
78
-
"oneOf": [
79
-
{
80
-
"type": "string",
81
-
"minLength": 1
82
-
},
83
-
{
84
-
"type": "array",
85
-
"minItems": 1,
86
-
"items": {
78
+
"if": {
79
+
"properties": {
80
+
"wmts:encoding": {
81
+
"const": "rest"
82
+
}
83
+
}
84
+
},
85
+
"then": {
86
+
"$comment": "REST request encoding",
87
+
"properties": {
88
+
"wmts:encoding": {
89
+
"const": "rest"
90
+
},
91
+
"variables": {
92
+
"type": "object",
93
+
"description": "This object contains one key per substitution variable in the templated URL. Each key defines the schema of one substitution variable using a JSON Schema fragment and can thus include things like the data type of the variable, enumerations, minimum values, maximum values, etc."
0 commit comments