-
Notifications
You must be signed in to change notification settings - Fork 393
Description
Feature Request
The same way vector or WMTS sources style can be edited (or selected), it could be very useful for remote COG added as Web Data (via a remote endpoint) to have a user-configurable style.
There are not a lot of platforms/webmap tools, to my knowledge, that take advantage of COG tiling structure to do on-the-fly indices computation like NDVI for MS Multispectral COG. Letting the user load a raster on Terriajs, and apply custom raster style would be great! Akin to a on-the-fly raster calculator with band arithmetic or math expression support, the below could be nice:
- set custom band interpretation (custom band for R, G, B channels)
- custom min/max stretching
- and eventually apply math expressions
Similar alternatives
Existing tooling with similar feature-set
- geomatico are behind the maplibre-cog-protocol, with examples advanced-viewer and custom-colorbut allows visualizations of vegetation indices or other thematic indices, as well as gain/gamma correction, RGB contrast stretching,
- The best existing web UI - but only applicable to Sentinel Data - is probably that of Copernicus Browser - a bit hidden, accessible by selecting a theme like Vegetation or Agriculture, selecting a Pin, then in Layers panel, there are simple and advanced modes, nice indices computation based on raster bands, as well as composites or index A/B or (A-B)/(A+B). Some code might be on this repo and
VisualizationPanel/VisualizationLayer/CustomVisualizationLayer - The great TiTiler might soon get expression support. It is based on
numexpr, supported-operators interprets expressions like(B1 - B2) / (B1 + B2) - ESRI layers-imagerytilelayer-cog. Useful bandarithmetic and rasterFunctionTemplate
- OpenLayers cog-stretch example and editable CSB
- geotiff-js cog-explorer can ingest any COG but has support only for pipeline-steps sigmoid and gamma, no more granular control.
- kylebarron/deck.gl-raster and keplergl raster-tile-layer docs
Potentially linked/similar issues:
- ArcGisImageServerRenderingRule which parses
bandIdsandrenderingRule - THREDDS 5.x: Add support for palettes returned by THREDDS GetMetadata call #6893
- Allow users to select color palette on ncWMS2 endpoints #2200
On a side-note, would anyone have any idea why these COGs (RGB, DSM) won't get imported by terriajs? Seems that I'm getting a bunch of errors like Invalid or unsupported photometric interpretation or An error occurred in "U": Failed to obtain image tile X: 0 Y: 0 Level: 0. I saw in changelog, Add support for Cloud Optimised Geotiff (cog) in Cesium mode. Currently supports EPSG 4326 and 3857. There is experimental support for other projections but performance might suffer and there could be other issues.