-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Styled Layer Descriptor (SLD) in STAC? #916
Comments
@schwehr - I think it could make sense as an additional asset. There is as of yet no SLD JSON that I know of. I imagine OGC API will retool styling at some point, but I don't think it's high on their list. Could perhaps be part of the rendering hints extension as it seems inline. Though as just an extra asset type it probably doesn't need its own extension, but it could be good to talk about it there. There's nothing preventing making it an asset, so I'm interested to see if anyone does this. To make it work well we'd need clients that understand SLD, and I'm not sure most do. |
Chris - I'd like to find a styling approach to EE datasets in STAC sometime soon, as this is the only major point stopping us from fully converting to STAC. The fields we need are: There can be more styling features requested, so I'm hesitant of creating a new small styling language when SLD exists. However, if many clients don't support it, what do they support? My strawman proposal is to create an extension that is intended to mirror an existing standard (eg, "sld:"), or maybe just a subset of a standard to begin with. |
@schwehr & @simonff - sounds great. Doing a subset of SLD as JSON makes good sense to me. As discussed on gitter, the other major option seems to be the mapbox style spec. The OGC Styles API work seems to present SLD and mapbox styles as equally valid options. My one worry with SLD in JSON is that no one has done it so far (afaik), so it could end up as something no one really maintains. @cportele - do you have any insight / recommendations on the future of json styling in OGC? The Google Earth Engine team wants to be able to specify a subset of rendering in their STAC implementation. I think their current plan is to try out their desired subset with both mapbox styles and a JSON version of SLD. We're definitely looking for something 'now', but if there's a way to align with future directions that'd be great. |
The most common style we use in Earth Engine is applying min and max to rasters (with implied colors: black for values below min, white for value above max, and interpolated grayscale in between). I don't see how to do this natively with either Mapbox or SLD. SLD is close: a two-color ColorMap can be used., but the colors are required. We don't have to require them, though. But Mapbox GL-JS does not have anything similar at all, AFAIU. There is this discussion about raster-colorize, but nothing has been implemented. I don't understand Mapbox expressions yet - maybe there is a way to take advantage of them? But they are not easy to use. This seems like a serious blocker for our purposes. |
@schwehr / @simonff - did you ever implement this? I think the straightforward route is just adding SLD xml as an asset. If you did this we could add to the spec that SLD is one of the types that can be used (hopefully it has a media type?), and then add a 'role' of 'styling' or something. Or could do an extension if straight SLD xml wasn't used. |
Chris - we don't plan to work with SLD now, as it's too hard to express in it some simple patterns that we need. |
Cool. If you've got a simple JSON style language I'm happy to use STAC to help promote it. But I think I'll close this issue for now. |
I've been told:
So definitely not worth doing SLD. |
Does it make sense to allow for the use of SLD in STAC for specifying how one might visualize a collection or item? Is there a JSON version of SLD?
https://en.wikipedia.org/wiki/Styled_Layer_Descriptor
The text was updated successfully, but these errors were encountered: