Skip to content

Add expression_type and stylesheet link support to rendering extension - #28

Open
emmanuelmathot wants to merge 3 commits into
mainfrom
fix/issue-17-21-format-vocabulary
Open

emmanuelmathot wants to merge 3 commits into
mainfrom
fix/issue-17-21-format-vocabulary

Conversation

@emmanuelmathot

Copy link
Copy Markdown
Member

Introduce expression_type for identifying expression dialects and add support for rel: "stylesheet" links to reference external style documents. Include a new vector data example demonstrating the extension's application on non-raster data. Update the changelog to reflect these additions.

fixes #17 and #21

@emmanuelmathot emmanuelmathot changed the title Add expression_type and stylesheet link support to rendering extension Add expression_type and stylesheet link support to rendering extension Sep 22, 2026
Comment thread json-schema/schema.json
Comment on lines 285 to +290
"expression": {
"type": ["string", "object", "array"]
},
"expression_type": {
"type": "string"
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I guess the schema should ensure that expression_type is required when expression is set and vice versa. They can't really be provided alone.

Comment thread README.md
"rel": "stylesheet",
"type": "application/vnd.mapbox.style+json",
"href": "https://example.com/styles/ndvi.json",
"render": "ndvi"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we also make this usable without the render extension? So that we can just connect an asset and a style? Especially in the vector case it doesn't make a lot of sense to use render.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It actually make sense when you want to fine tune the rendering. Check the examples.
Besides that note, I do not see what prevent a user to add a stylesheet link as of today.

@m-mohr m-mohr Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sounds like a misunderstanding.

The way it is is fine for render, but there's no way to directly make a connection between asset (or another link) and the stylesheet. For vector you may just want t a stylesheet without the render extension, as render is primarily targeting raster data.

@m-mohr

m-mohr commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

After letting this sink in a bit, I don't think it's a good idea to give too much flexibility here. If you can define any expression type that will eventually lead to the issue that no client can support them because you don't know what you get and you can't implement them all. I'd rather prefer to select one and stick with it for now. If we really need this in the future, let's add them on a case by case basis with good reasons. If we can't agree on a good single specification for expression, adding expression_type could be fine when we define an enum of allowed values. Just allowing everything will not really scale, IMHO: Keep in mind someone needs to implement this on the client side so that it's actually useful, but no one can implement "everything" (and doesn't even know what "everything" is).

As a side note, it could make sense to have the same approach for expression types in https://github.com/stac-extensions/processing#expression-object and here so that it's a concistent flow (e.g. adding numexpr there). Having that said, supporting more types for processing is much simpler as it's mostly for provenance while here it needs to be implemented by clients for actual rendering.

With regards to the stylesheets relation type, we should define it once and link to it, I think. As it's not only for raster, probably better in maps or somewhere central rather than in render, which has a focus on raster.

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.

Which "format" for expression?

2 participants