[feat] allow to open COG links in external viewer#7387
[feat] allow to open COG links in external viewer#7387jahow merged 3 commits intogeonetwork:mainfrom
Conversation
|
Thanks! would it make sense to have it also show in the GeoNetwork viewer? I'm not sure what would happen currently if no external viewer is used and the user clicks on the "add layer" button for COG (or 3DTiles for that matter) OpenLayers has received a lot of powerful features for showing live COGs, maybe we could upgrade the lib and leverage these. |
as i already said in #6950 i dont know since i never really used/tested the gn bundled viewer.. and i think my code adds support/plumbing for that, just i have no idea what would happen in that case if the links are clicked and sent to the bundled viewer. |
|
I added a commit to address #6950 (comment), @landryb if you're ok with it then I think we can merge both PRs. |
definitely, i'll make sure to backport this to georchestra/geonetwork#252 so that georchestra's fork is up to date with upstream. thanks ! |
98fd3c3 to
7c7fb62
Compare
|
done |
This will also avoid switching to the viewer if no layer with supported protocol is found
How difficult would that be? A quick test shows that Stamen layer require StadiaMaps, tileLoadFunction need an update, annotations panel is not displayed but legend/layer manager/measures/zoom/print/wfs layers/feature info looks ok. |
Probably not much work really, one or two days at most. There might be more work for displaying COGs in the viewer, unless they simply contain RGB channels; otherwise we might have to let the user decide which channels to show under which color etc. |
Tentative #7421 maybe you can think of any other OL changes to check? |
| addMdLayerToMap: function (link, md) { | ||
| // This is probably only a service | ||
| // Open the add service layer tab | ||
| var config = buildAddToMapConfig(link, md); |
on top of #6950 to avoid conflicts - so only the last two commits matter for the feature - adds support for OGC:COG links, that's a cherrypick/backport of georchestra/geonetwork#252.
i've chosen OGC:COG as it's a candidate to OGC standards cf https://portal.ogc.org/files/102116
with this in the XML:
i can open COG links in a mapstore2 instance with support for parametrized opening of COG links (being upstreamed in geosolutions-it/MapStore2#9531)