Repository navigation
Add expression_type and stylesheet link support to rendering extension - #28
emmanuelmathot wants to merge 3 commits into
Conversation
expression_type and stylesheet link support to rendering extension
| "expression": { | ||
| "type": ["string", "object", "array"] | ||
| }, | ||
| "expression_type": { | ||
| "type": "string" | ||
| }, |
There was a problem hiding this comment.
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.
| "rel": "stylesheet", | ||
| "type": "application/vnd.mapbox.style+json", | ||
| "href": "https://example.com/styles/ndvi.json", | ||
| "render": "ndvi" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
…t-vocabulary # Conflicts: # CHANGELOG.md # README.md
…et; update documentation for clarity
|
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. |
Introduce
expression_typefor identifying expression dialects and add support forrel: "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