Skip to content

Commit 7a6bab4

Browse files
authored
Added Basic WMS (#14)
* Added Basic WMS (partially implements #8)
1 parent 5b5c4e3 commit 7a6bab4

File tree

5 files changed

+94
-9
lines changed

5 files changed

+94
-9
lines changed

CHANGELOG.md

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

99
### Added
1010

11+
- OGC WMS (Basic WMS only)
1112
- 3D Tiles
1213

1314
### Changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ It allows to provide links to web map services for visualization purposes.
1313

1414
The following services are supported:
1515
- [3D Tiles](#3d-tiles)
16+
- [OGC WMS](#ogc-wms)
1617
- [OGC WMTS](#ogc-wmts)
1718
- [TileJSON](#tilejson)
1819
- [XYZ](#xyz)
@@ -44,6 +45,20 @@ Links to a [3D Tiles](https://docs.ogc.org/cs/18-053r2/18-053r2.html) implementa
4445
| href | string | **REQUIRED**. Link to a tileset. |
4546
| type | string | Recommended to be set to `application/json`. |
4647

48+
### OGC WMS
49+
50+
Links to a [OGC Web Map Service](https://www.ogc.org/standards/wms) (WMS) implementation (versions 1.x).
51+
Only (tiled) "Basic WMS" is supported at this time.
52+
53+
| Field Name | Type | Description |
54+
| --------------- | -------------------- | ----------- |
55+
| rel | string | **REQUIRED**. Must be set to `wms`. |
56+
| href | string | **REQUIRED**. Link to the WMS, without any WMS specific query parameters. |
57+
| type | string | Recommended to be set to the media type the Capabilities document, usually `text/xml`. |
58+
| wms:layers | \[string] | **REQUIRED**. The layers to show on the map by default. Can't be empty. |
59+
| 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. |
60+
| wms:dimensions | Map\<string, string> | Any additional dimension parameters to add to the request as query parameters (e.g. the dimensions `TIME` or `ELEVATION`). |
61+
4762
### OGC WMTS
4863

4964
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",
@@ -72,4 +88,4 @@
7288
"type": "application/json"
7389
}
7490
]
75-
}
91+
}

examples/item.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,15 @@
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+
},
6069
{
6170
"href": "https://maps.example.com/xyz/{z}/{x}/{y}.jpg",
6271
"rel": "xyz",

json-schema/schema.json

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

0 commit comments

Comments
 (0)