Skip to content

Commit

Permalink
Improve and clarify WMS support
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mohr committed Oct 19, 2023
1 parent 2f2643b commit 3ae2c31
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- PMTiles
- New property `wms:transparent` for WMS

### Changed

- The `type` for WMS and WMTS links should be set to the image media type that the client should request for tiles.
- WMS supports only v1.3.0 of the specification

### Deprecated

### Removed

### Fixed

- WMS: Clarified the behavior of `wms:layers` and `wms:styles`

## [1.2.0]

### Added
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Links to a [3D Tiles](https://docs.ogc.org/cs/18-053r2/18-053r2.html) implementa

### OGC WMS

Links to a [OGC Web Map Service](https://www.ogc.org/standards/wms) (WMS) implementation (versions 1.x).
Links to a [OGC Web Map Service](https://www.ogc.org/standards/wms) (WMS) implementation (versions 1.3.0).
Only (tiled) "Basic WMS" is supported at this time.

| Field Name | Type | Description |
Expand All @@ -59,6 +59,13 @@ Only (tiled) "Basic WMS" is supported at this time.
| 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`). |
| wms:transparent | boolean | Sets whether the layers should be rendered transparent or not. Default: `false` |

If you provide multiple array elements in `wms:layers` (e.g. `["layerA", "layerB"]`), each should occur in a separate layer in the mapping library so that requests for the layers are sent.
If you want to send multiple layers in a single request, provide them as a string with comma-separated values: `["layerA,layerB"]`.
`wms:layers` and `wms:styles` work in parallel, so the first style in the array will be used for the first layer, etc.

- [More details on the mapping between WMS query parameters and the STAC fields](./wms.md)

### OGC WMTS

Expand All @@ -73,6 +80,8 @@ Links to a [OGC Web Map Tile Service](https://www.ogc.org/standards/wmts) (WMTS)
| wmts:layer | string\|\[string] | **REQUIRED**. The layers to show on the map by default, either a list of layer names or a single layer name. |
| wmts:dimensions | Map\<string, string> | Any additional dimension parameters to add to the request as key-value-pairs, usually added as query parameters. |

If you provide multiple array elements in `wmts:layer` (e.g. `["layerA", "layerB"]`), each should occur in a separate layer in the mapping library so that individual requests for the layers are sent.

#### href

For WMTS, the `href` is pointing to the URL of the Capabilities document, but without the query parameters for the Capabilities request.
Expand Down
23 changes: 23 additions & 0 deletions wms.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# OGC WMS

## Mapping between STAC extension field and WMS GetMap request parameters

| Request Parameter | Mandatory | Description | Mapping / Implementation guide |
| -------------------------------------------- | --------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
| VERSION=1.3.0 | Yes | Request version. | Always `1.3.0` - We assume everyone supports 1.3.0 today. |
| REQUEST=GetMap | Yes | Request name. | Always `GetMap`. |
| LAYERS=layer_list | Yes | Comma-separated list of one or more map layers. | via `wms:layers`, one layer in the mapping library per array element |
| STYLES=style_list | Yes | Comma-separated list of one rendering style per requested layer. | via `wms:styles`, 1:1 mapping to `wms:layers` |
| CRS=namespace:identifier | Yes | Coordinate reference system. | determined by mapping library, usually EPSG:3857 |
| BBOX=minx,miny,maxx,maxy | Yes | Bounding box corners (lower left, upper right) in CRS units. | determined by mapping library |
| WIDTH=output_width | Yes | Width in pixels of map picture. | determined by mapping library |
| HEIGHT=output_height | Yes | Height in pixels of map picture. | determined by mapping library |
| FORMAT=output_format M Output format of map. | Yes | | via `type` |
| TRANSPARENT=TRUE\|FALSE | No | Background transparency of map (default=FALSE). | via `wms:transparent` |
| BGCOLOR=color_value | No | Hexadecimal red-green-blue colour value for the background color (default=0xFFFFFF). | not supported, some libraries may support setting it via `wms:dimensions` |
| EXCEPTIONS=exception_format | No | The format in which exceptions are to be reported by the WMS (default=XML). | determined by mapping library |
| TIME=time | No | Time value of layer desired. | via `wms:dimensions` |
| ELEVATION=elevation | No | Elevation of layer desired. | via `wms:dimensions` |
| Other sample dimension(s) | No | Value of other dimensions as appropriate. | via `wms:dimensions` |

Columns 1-3 are coming from the [OGC WMS specification, version 1.3.0](https://portal.ogc.org/files/?artifact_id=14416), chapter 7.3.2

0 comments on commit 3ae2c31

Please sign in to comment.