From ca8b1e44046c31e5e1104206d05d88dfd4c8350f Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Tue, 30 Jan 2024 14:03:24 +0100 Subject: [PATCH] Add roles --- CHANGELOG.md | 2 +- README.md | 30 +++++++++++++++++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2326621..6bc4d8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,8 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- PMTiles - New property `wms:transparent` for WMS +- Roles to specify the layer type, visibility and default layers. ### Changed diff --git a/README.md b/README.md index 663b7c0..5a1d0ac 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Important resources in this extension: This extension only extends the [Link Object](https://github.com/radiantearth/stac-spec/tree/master/item-spec/item-spec.md#link-object) used in all STAC entities (Catalogs, Collections, Items). It requires specific relation types to be set for the `rel` field in the -Link Object. +Link Object and also allows to set specific `roles`. An attribution field is not defined as part of this extension, but it is RECOMMENDED to provide an attribution in the top-level object of the document (in the `properties` for Items) via the `attribution` field as defined in @@ -144,8 +144,36 @@ The following field applies to multiple types of web mapping services: | Field Name | Type | Description | | ------------ | --------- | ----------- | +| roles | \[string] | A list of roles, see the list below. | | href:servers | \[string] | A list of replacement values for `{s}` in `href`s. | +#### roles + +Several roles can be assigned that provide an indicator for the web map library how to handle the link. + +**One of** the following roles may bet set to describe the type of layer. +If no role is provided, `data` is assumed to be the default. + +| Role | Description | +| ------- | ----------- | +| basemap | A basemap. | +| overlay | An overlay with transparent background to show on top of basemaps. | +| data | A layer with the actual data to show on top of the other layer types. | + +**One of** the following roles may be used to indicate whether a layer should be shown by default. +If none of the roles is provided, it's up to the discretion of the implementation to choose. + +| Role | Description | +| --------- | ----------- | +| visible | Make the layer *visible* by default. | +| invisible | Make the layer *invisible* by default. | + +Additionally, the following role may be used: + +| Role | Description | +| ------- | ----------- | +| default | If multiple layers with the same type are visible, specify which one should be shown by default. | + #### href:servers This field is used to specify a set of URLs for a web mapping library so that requests can be sent to multiple servers,