You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have two png xyz encoded tile layers. One contain RGB-endoded elevation and the other is an RGB with encoded slope angle. What I want to achieve is to highlight the terrain where for example the elevation is between 200 and 1500 and the slope is between 30 and 50 degrees. These limits can change quickly and dynamically. I want this to be draped on top of the 3D terrain like any other layer. Is there any way to combine the data from two layer sources and color it from a combination of their values?
What I've considered:
A RasterSource with a RasterLayer using RasterColorMix and RasterColor - I can only read the values from one source?
A native CustomLayer implementation with a custom shader - I can make the layer work fine but I lose the draping over the 3D terrain, the tiles lack elevation information, and duplicating all the code for generating the 3D mesh for one specific layer doesn't feel like a feasable solution.
A custom fetchTileFunction that fecthes both tiles and combines their values - but that is not supported by rnmapbox?
Server side calculations, combine the tiles in the backend and serve the final result - Sure, this is one way to go but it puts a lot of load on the server and adds unnecessary fetching of tiles that could be fetched once and recalculated when the parameters change.
A native CustomRasterSource - maybe that's the way to go?
Before I dig deep into one of the options, is there any suggestions of best approach here? Am I missing some other option?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I have two png xyz encoded tile layers. One contain RGB-endoded elevation and the other is an RGB with encoded slope angle. What I want to achieve is to highlight the terrain where for example the elevation is between 200 and 1500 and the slope is between 30 and 50 degrees. These limits can change quickly and dynamically. I want this to be draped on top of the 3D terrain like any other layer. Is there any way to combine the data from two layer sources and color it from a combination of their values?
What I've considered:
Before I dig deep into one of the options, is there any suggestions of best approach here? Am I missing some other option?
Beta Was this translation helpful? Give feedback.
All reactions