-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Add a CompositeTile source #16090
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
base: main
Are you sure you want to change the base?
Add a CompositeTile source #16090
Conversation
|
📦 Preview the website for this branch here: https://deploy-preview-16090--ol-site.netlify.app/. |
|
It looks like you intend to accept reproj tiles in the composite instead of reprojecting composite sources? In that case should the composite projection be the view projection and the tilegrid be |
|
Hi @mike-000, thank you for your comment! Ah that's right, intended to accept a reprojected tile as an image. Oh, and I'll take a look at these PRs. |
|
Passing the projection from the renderer's |
00d1f08 to
37c7b85
Compare
|
Indeed, thank you! |
|
Be aware that currently if the requested projection is equivalent to #15988 would change that for a DataTile source if a |
|
Yeah, I see. Thank you. |
7a6dcf8 to
d715d11
Compare
Now it includes extended band data, even for canvas layers
|
Is this somewhat useful...? 🤔 |
src/ol/source/CompositeTile.js
Outdated
| .map((source) => source.getAttributions()) | ||
| .filter(Boolean) | ||
| .map((func) => func(frameState)) | ||
| .join(' / '); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid hardcoding a separator. If you push each attribution to an array the css will format it according to any application specific css.
e.g. custom separator
.ol-attribution li:not(:last-child):after {
content: " / ";
}
or separate lines
.ol-attribution li {
display: block;
}
The code in ol/source/Raster may be useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah! Thank you!
I'll change it to:
- .map((func) => func(frameState))
- .join(' / ');
+ .flatMap((func) => func(frameState));looks reasonable?
|
In the example it looks like the OSM is not interpolated. Is it possible to handle the different interpolate settings of the original sources? |
I want to composite a tile image (served by OSM, for example) with a floating-point data tile, so that I can access both at the same time via the
bandoperator of WebGL style expressions.This requires multiple textures to be available within a shader at the same time. However, it seems that
ol/DataTileandol/webgl/TileTexturecurrently don't support uploading multiple data types at once.This PR adds support for this functionality.
Additionally, it introduces a new virtual utility source,
ol/source/CompositeTile.This allows tile sources to be combined as if they were a single source, making the data equally accessible via the
bandoperator.