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 5854ad1
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 2 deletions.
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
13 changes: 12 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,14 @@ 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 +81,9 @@ 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
3 changes: 2 additions & 1 deletion examples/item.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@
"title": "RGB composite visualized through a WMS",
"wms:layers": [
"rgb"
]
],
"wms:transparent": true
},
{
"href": "https://maps.example.com/xyz/{z}/{x}/{y}.jpg",
Expand Down
3 changes: 3 additions & 0 deletions json-schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@
"additionalProperties": {
"type": "string"
}
},
"wms:transparent": {
"type": "boolean"
}
}
}
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 and the WMS GetMap 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 | Yes | Output format of map. | 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 5854ad1

Please sign in to comment.