diff --git a/CHANGELOG.md b/CHANGELOG.md index 81c0392..f9112e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- Added OGC WMS (Basic WMS only) + ### Changed ### Deprecated diff --git a/README.md b/README.md index 2f1a4ba..6895c97 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ This document explains the Web Map Links Extension to the It allows to provide links to web map services for visualization purposes. The following services are supported: +- [OGC WMS](#ogc-wms) - [OGC WMTS](#ogc-wmts) - [TileJSON](#tilejson) - [XYZ](#xyz) @@ -33,6 +34,20 @@ An attribution field is not defined as part of this extension, but it is RECOMME in the top-level object of the document via the `attribution` field as defined in [OGC API - Commons - Part 1](http://docs.ogc.org/DRAFTS/19-072.html#landing-page). +### OGC WMS + +Links to a [OGC Web Map Service](https://www.ogc.org/standards/wms) (WMS) implementation (versions 1.x). +Only "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 c234106..d7868cb 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", @@ -66,4 +82,4 @@ "type": "application/json" } ] -} +} \ No newline at end of file diff --git a/examples/item.json b/examples/item.json index 903e68c..1b8237e 100644 --- a/examples/item.json +++ b/examples/item.json @@ -57,6 +57,16 @@ "satellite" ] }, + { + "href": "https://maps.example.com/wms", + "rel": "wms", + "type": "text/xml", + "title": "RGB composite visualized through a WMS", + "wms:layers": [ + "rgb" + ], + "wms:styles": [] + }, { "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 4b5eb7f..3afcb39 100644 --- a/json-schema/schema.json +++ b/json-schema/schema.json @@ -72,14 +72,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", @@ -94,6 +100,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" + } + } + } + } } ] }