Skip to content

Proposal for maps extension - #1

Draft
m-mohr wants to merge 1 commit into
mainfrom
proposal
Draft

m-mohr wants to merge 1 commit into
mainfrom
proposal

Conversation

@m-mohr

@m-mohr m-mohr commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@emmanuelmathot emmanuelmathot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @m-mohr , this is a solid base and very close to what we discussed. Overall structure looks right to me. Some points in sub comments/suggestions

Comment thread README.md
| ------------- | ----------------------------------- | ----------- |
| title | string | A title for the map, e.g. for a map picker. |
| description | string | A description of the map. [CommonMark 0.29](https://commonmark.org/) syntax MAY be used for rich text representation. |
| roles | \[string] | `default` marks the map that clients show by default. |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing prevents several maps from having the default role. Maps are an object, so there's no reliable "first" to fall back on either.

Suggested change
| roles | \[string] | `default` marks the map that clients show by default. |
| roles | \[string] | `default` marks the map that clients show by default. At most one map SHOULD have this role. If none has it, clients choose one. |

Comment thread README.md
Comment on lines +63 to +64
**dimensions**: The keys are the names of the dimensions, as used in the [Datacube Extension](https://github.com/stac-extensions/datacube)
(`cube:dimensions`) or by the services (e.g. `TIME` in WMS). The values apply wherever a layer's source doesn't set its own value.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a map mixes a datacube asset (time) and a WMS (TIME), which key applies, and is matching case-sensitive? Keys should always be cube:dimensions names and clients map them to service parameters (WMS TIME/ELEVATION, WMTS dimension identifiers).

This also relates to stac-extensions/render#19 (fixing non-spatial dimensions of a datacube).

Comment thread README.md
| max_resolution | number | The coarsest resolution at which the layer is shown, see [resolution ranges](#resolution-ranges). |

Each layer MUST provide exactly one of `asset`, `link` and `render`.
The keys and `id`s are looked up in the document first and then in the parent Collection.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Say how the parent is found, and that it only applies to Items.

Suggested change
The keys and `id`s are looked up in the document first and then in the parent Collection.
The keys and `id`s are looked up in the document first and then, for Items, in the parent Collection (found through the `collection` link).

Comment thread README.md
Comment on lines +147 to +148
Clients SHOULD hide the layer outside of this range.
If both are provided, `min_resolution` must be lower than or equal to `max_resolution`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth stating the bounds explicitly. OpenLayers uses minResolution inclusive and maxResolution exclusive; matching it avoids clients disagreeing at exactly the boundary.

Suggested change
Clients SHOULD hide the layer outside of this range.
If both are provided, `min_resolution` must be lower than or equal to `max_resolution`.
Clients SHOULD hide the layer outside of this range.
`min_resolution` is inclusive and `max_resolution` is exclusive, i.e. the layer is shown if
`min_resolution <= resolution < max_resolution`, as in OpenLayers.
If both are provided, `min_resolution` must be lower than `max_resolution`.

Comment thread README.md
Comment on lines +150 to +152
The resolution is the **distance on the ground in meters per display (CSS) pixel**, measured at the center of the
spatial extent of the STAC entity (`bbox` in Items, the first bounding box of the spatial extent in Collections).
This makes the value independent of the projection of the map.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A map can have its own bbox. For a Collection with a global extent and a regional map, measuring at the entity's centre would convert at (0,0) instead of the region.

Suggested change
The resolution is the **distance on the ground in meters per display (CSS) pixel**, measured at the center of the
spatial extent of the STAC entity (`bbox` in Items, the first bounding box of the spatial extent in Collections).
This makes the value independent of the projection of the map.
The resolution is the **distance on the ground in meters per display (CSS) pixel**, measured at the center of the
map's `bbox` if provided, otherwise of the spatial extent of the STAC entity
(`bbox` in Items, the first bounding box of the spatial extent in Collections).
This makes the value independent of the projection of the map.

Comment thread README.md
| asset | string | Source: The key of an asset. |
| link | string\|Link Object\|Link Template Object | Source: The [`id`](#link-identifiers) of a link or link template in the document, or an embedded link for layers from outside of the document (e.g. a basemap). |
| render | string | Source: The key of a render. The render provides its own data and portrayal. |
| style | [Style Reference Object](#style-reference-object) | The portrayal that is applied to the data of an `asset` or `link` source. |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| style | [Style Reference Object](#style-reference-object) | The portrayal that is applied to the data of an `asset` or `link` source. |
| style | [Style Reference Object](#style-reference-object) | The stylesheet that is applied to the data of an `asset` or `link` source. |

Comment thread README.md
Comment on lines +102 to +114
| Field Name | Type | Description |
| ---------- | ------------------- | ----------- |
| link | string\|Link Object | The `id` of a stylesheet link in the document, or an embedded stylesheet link. |
| render | string | The key of a render that is applied to the data of the layer's source. |

Each Style Reference Object MUST provide exactly one of `link` and `render`.

**link**: Stylesheet links use the relation type `stylesheet`, which is
[registered by IANA](https://www.iana.org/assignments/link-relations/link-relations.xhtml).
The `type` is REQUIRED and identifies the encoding of the stylesheet, preferably with the media types of
[OGC API - Styles](https://docs.ogc.org/DRAFTS/20-009.html), e.g. `application/vnd.mapbox.style+json` or `application/vnd.ogc.sld+xml`.

**render**: Only renders that don't reference any data themselves can be applied to another source.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep render as a source only. A render always references its own data (assets is required in the Render Extension v2.1.0), so a render without data isn't valid, and using it as a style would mean its assets are silently replaced by the layer's source. Either an asset (optionally with a stylesheet) or a render, not both.

Suggested change
| Field Name | Type | Description |
| ---------- | ------------------- | ----------- |
| link | string\|Link Object | The `id` of a stylesheet link in the document, or an embedded stylesheet link. |
| render | string | The key of a render that is applied to the data of the layer's source. |
Each Style Reference Object MUST provide exactly one of `link` and `render`.
**link**: Stylesheet links use the relation type `stylesheet`, which is
[registered by IANA](https://www.iana.org/assignments/link-relations/link-relations.xhtml).
The `type` is REQUIRED and identifies the encoding of the stylesheet, preferably with the media types of
[OGC API - Styles](https://docs.ogc.org/DRAFTS/20-009.html), e.g. `application/vnd.mapbox.style+json` or `application/vnd.ogc.sld+xml`.
**render**: Only renders that don't reference any data themselves can be applied to another source.
| Field Name | Type | Description |
| ---------- | ------------------- | ----------- |
| link | string\|Link Object | **REQUIRED**. The `id` of a stylesheet link in the document, or an embedded stylesheet link. |
**link**: Stylesheet links use the relation type `stylesheet`, which is
[registered by IANA](https://www.iana.org/assignments/link-relations/link-relations.xhtml).
The `type` is REQUIRED and identifies the encoding of the stylesheet, preferably with the media types of
[OGC API - Styles](https://docs.ogc.org/DRAFTS/20-009.html), e.g. `application/vnd.mapbox.style+json` or `application/vnd.ogc.sld+xml`.
A render can't be used as a style. It always references its own data and is used as a layer source instead,
see `render` in the [Layer Object](#layer-object).

Comment thread README.md
Comment on lines +124 to +128
| `{"asset": "fields", "style": {"render": "fields"}}` | The asset, styled by a render. |
| `{"render": "ndvi"}` | A render with its own data, rendered by the client or delivered by a web map link that references the render. |
| `{"link": "topo-wms"}` | A service as it's delivered. |
| `{"link": "fields-pmtiles", "style": {"link": "fields-outline"}}` | The data of a service, styled by a stylesheet. |
| `{"link": "fields-pmtiles", "style": {"render": "fields"}}` | The data of a service, styled by a render. |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop the two render-as-style rows, following the change to the Style Reference Object.

Suggested change
| `{"asset": "fields", "style": {"render": "fields"}}` | The asset, styled by a render. |
| `{"render": "ndvi"}` | A render with its own data, rendered by the client or delivered by a web map link that references the render. |
| `{"link": "topo-wms"}` | A service as it's delivered. |
| `{"link": "fields-pmtiles", "style": {"link": "fields-outline"}}` | The data of a service, styled by a stylesheet. |
| `{"link": "fields-pmtiles", "style": {"render": "fields"}}` | The data of a service, styled by a render. |
| `{"render": "ndvi"}` | A render with its own data, rendered by the client or delivered by a web map link that references the render. |
| `{"link": "topo-wms"}` | A service as it's delivered. |
| `{"link": "fields-pmtiles", "style": {"link": "fields-outline"}}` | The data of a service, styled by a stylesheet. |

Comment thread json-schema/schema.json
Comment on lines +234 to +245
"oneOf": [
{
"required": [
"link"
]
},
{
"required": [
"render"
]
}
],

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style is stylesheet-only, see the README comment on the Style Reference Object.

Suggested change
"oneOf": [
{
"required": [
"link"
]
},
{
"required": [
"render"
]
}
],
"required": [
"link"
],

Comment thread json-schema/schema.json
Comment on lines +275 to +279
},
"render": {
"type": "string",
"minLength": 1
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
},
"render": {
"type": "string",
"minLength": 1
}
}

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants