Skip to content

Commit

Permalink
Added Basic WMS (#14)
Browse files Browse the repository at this point in the history
* Added Basic WMS (partially implements #8)
  • Loading branch information
m-mohr authored Jun 22, 2023
1 parent 5b5c4e3 commit 7a6bab4
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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\<string, string> | 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).
Expand Down
18 changes: 17 additions & 1 deletion examples/collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -72,4 +88,4 @@
"type": "application/json"
}
]
}
}
9 changes: 9 additions & 0 deletions examples/item.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
60 changes: 52 additions & 8 deletions json-schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
}
}
}
}
}
]
}
Expand Down

0 comments on commit 7a6bab4

Please sign in to comment.