diff --git a/CHANGELOG.md b/CHANGELOG.md index ddf8f18..bf9b19d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- OGC WMS (Basic WMS only) - 3D Tiles ### Changed diff --git a/README.md b/README.md index f2bbb64..fe85495 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ It allows to provide links to web map services for visualization purposes. The following services are supported: - [3D Tiles](#3d-tiles) +- [OGC WMS](#ogc-wms) - [OGC WMTS](#ogc-wmts) - [TileJSON](#tilejson) - [XYZ](#xyz) @@ -44,6 +45,20 @@ Links to a [3D Tiles](https://docs.ogc.org/cs/18-053r2/18-053r2.html) implementa | href | string | **REQUIRED**. Link to a tileset. | | type | string | Recommended to be set to `application/json`. | +### OGC WMS + +Links to a [OGC Web Map Service](https://www.ogc.org/standards/wms) (WMS) implementation (versions 1.x). +Only (tiled) "Basic WMS" is supported at this time. + +| Field Name | Type | Description | +| --------------- | -------------------- | ----------- | +| rel | string | **REQUIRED**. Must be set to `wms`. | +| href | string | **REQUIRED**. Link to the WMS, without any WMS specific query parameters. | +| type | string | Recommended to be set to the media type the Capabilities document, usually `text/xml`. | +| wms:layers | \[string] | **REQUIRED**. The layers to show on the map by default. Can't be empty. | +| 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. | +| wms:dimensions | Map\ | Any additional dimension parameters to add to the request as query parameters (e.g. the dimensions `TIME` or `ELEVATION`). | + ### OGC WMTS Links to a [OGC Web Map Tile Service](https://www.ogc.org/standards/wmts) (WMTS) implementation (versions 1.x). diff --git a/examples/collection.json b/examples/collection.json index fcecb98..ce20f6f 100644 --- a/examples/collection.json +++ b/examples/collection.json @@ -48,6 +48,22 @@ "time": "2022-01-01" } }, + { + "href": "https://maps.example.com/wms", + "rel": "wms", + "type": "text/xml", + "title": "RGB composite visualized through a WMS", + "wms:layers": [ + "rgb" + ], + "wms:styles": [ + "default" + ], + "wms:dimensions": { + "ELEVATION": "0", + "TIME": "2022-01-01" + } + }, { "href": "https://{s}.maps.example.com/xyz/{z}/{x}/{y}.png", "rel": "xyz", @@ -72,4 +88,4 @@ "type": "application/json" } ] -} +} \ No newline at end of file diff --git a/examples/item.json b/examples/item.json index a5caedd..d890d32 100644 --- a/examples/item.json +++ b/examples/item.json @@ -57,6 +57,15 @@ "satellite" ] }, + { + "href": "https://maps.example.com/wms", + "rel": "wms", + "type": "text/xml", + "title": "RGB composite visualized through a WMS", + "wms:layers": [ + "rgb" + ] + }, { "href": "https://maps.example.com/xyz/{z}/{x}/{y}.jpg", "rel": "xyz", diff --git a/json-schema/schema.json b/json-schema/schema.json index 5f40e0f..db5e776 100644 --- a/json-schema/schema.json +++ b/json-schema/schema.json @@ -73,14 +73,20 @@ ], "properties": { "wmts:layer": { - "type": [ - "string", - "array" - ], - "minItems": 1, - "items": { - "type": "string" - } + "oneOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "minLength": 1 + } + } + ] }, "wmts:dimensions": { "type": "object", @@ -95,6 +101,44 @@ } ] } + }, + { + "$comment": "Defines WMS links", + "if": { + "properties": { + "rel": { + "const": "wms" + } + } + }, + "then": { + "required": [ + "wms:layers" + ], + "properties": { + "wms:layers": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "minLength": 1 + } + }, + "wms:styles": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "wms:dimensions": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } } ] }