Skip to content

Commit 52c3a4d

Browse files
committed
Added Basic WMS (partially implements #8)
1 parent 85b8fd8 commit 52c3a4d

File tree

5 files changed

+96
-9
lines changed

5 files changed

+96
-9
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88

99
### Added
1010

11+
- Added OGC WMS (Basic WMS only)
12+
1113
### Changed
1214

1315
### Deprecated

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ This document explains the Web Map Links Extension to the
1212
It allows to provide links to web map services for visualization purposes.
1313

1414
The following services are supported:
15+
- [OGC WMS](#ogc-wms)
1516
- [OGC WMTS](#ogc-wmts)
1617
- [TileJSON](#tilejson)
1718
- [XYZ](#xyz)
@@ -33,6 +34,20 @@ An attribution field is not defined as part of this extension, but it is RECOMME
3334
in the top-level object of the document via the `attribution` field as defined in
3435
[OGC API - Commons - Part 1](http://docs.ogc.org/DRAFTS/19-072.html#landing-page).
3536

37+
### OGC WMS
38+
39+
Links to a [OGC Web Map Service](https://www.ogc.org/standards/wms) (WMS) implementation (versions 1.x).
40+
Only "Basic WMS" is supported at this time.
41+
42+
| Field Name | Type | Description |
43+
| --------------- | -------------------- | ----------- |
44+
| rel | string | **REQUIRED**. Must be set to `wms`. |
45+
| href | string | **REQUIRED**. Link to the WMS, without any WMS specific query parameters. |
46+
| type | string | Recommended to be set to the media type the Capabilities document, usually `text/xml`. |
47+
| wms:layers | \[string] | **REQUIRED**. The layers to show on the map by default. Can't be empty. |
48+
| wms:styles | \[string] | The styles to show on the map by default. If not provided or empty, an empty string will be used for the query parameter. |
49+
| wms:dimensions | Map\<string, string> | Any additional dimension parameters to add to the request as query parameters (e.g. the dimensions `TIME` or `ELEVATION`). |
50+
3651
### OGC WMTS
3752

3853
Links to a [OGC Web Map Tile Service](https://www.ogc.org/standards/wmts) (WMTS) implementation (versions 1.x).

examples/collection.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,22 @@
4848
"time": "2022-01-01"
4949
}
5050
},
51+
{
52+
"href": "https://maps.example.com/wms",
53+
"rel": "wms",
54+
"type": "text/xml",
55+
"title": "RGB composite visualized through a WMS",
56+
"wms:layers": [
57+
"rgb"
58+
],
59+
"wms:styles": [
60+
"default"
61+
],
62+
"wms:dimensions": {
63+
"ELEVATION": "0",
64+
"TIME": "2022-01-01"
65+
}
66+
},
5167
{
5268
"href": "https://{s}.maps.example.com/xyz/{z}/{x}/{y}.png",
5369
"rel": "xyz",
@@ -66,4 +82,4 @@
6682
"type": "application/json"
6783
}
6884
]
69-
}
85+
}

examples/item.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,16 @@
5757
"satellite"
5858
]
5959
},
60+
{
61+
"href": "https://maps.example.com/wms",
62+
"rel": "wms",
63+
"type": "text/xml",
64+
"title": "RGB composite visualized through a WMS",
65+
"wms:layers": [
66+
"rgb"
67+
],
68+
"wms:styles": []
69+
},
6070
{
6171
"href": "https://maps.example.com/xyz/{z}/{x}/{y}.jpg",
6272
"rel": "xyz",

json-schema/schema.json

Lines changed: 52 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,20 @@
7272
],
7373
"properties": {
7474
"wmts:layer": {
75-
"type": [
76-
"string",
77-
"array"
78-
],
79-
"minItems": 1,
80-
"items": {
81-
"type": "string"
82-
}
75+
"oneOf": [
76+
{
77+
"type": "string",
78+
"minLength": 1
79+
},
80+
{
81+
"type": "array",
82+
"minItems": 1,
83+
"items": {
84+
"type": "string",
85+
"minLength": 1
86+
}
87+
}
88+
]
8389
},
8490
"wmts:dimensions": {
8591
"type": "object",
@@ -94,6 +100,44 @@
94100
}
95101
]
96102
}
103+
},
104+
{
105+
"$comment": "Defines WMS links",
106+
"if": {
107+
"properties": {
108+
"rel": {
109+
"const": "wms"
110+
}
111+
}
112+
},
113+
"then": {
114+
"required": [
115+
"wms:layers"
116+
],
117+
"properties": {
118+
"wms:layers": {
119+
"type": "array",
120+
"minItems": 1,
121+
"items": {
122+
"type": "string",
123+
"minLength": 1
124+
}
125+
},
126+
"wms:styles": {
127+
"type": "array",
128+
"items": {
129+
"type": "string",
130+
"minLength": 1
131+
}
132+
},
133+
"wms:dimensions": {
134+
"type": "object",
135+
"additionalProperties": {
136+
"type": "string"
137+
}
138+
}
139+
}
140+
}
97141
}
98142
]
99143
}

0 commit comments

Comments
 (0)