mapbox-gl-js icon indicating copy to clipboard operation
mapbox-gl-js copied to clipboard

[WIP] 1404 Get Raster Pixel Color At Location

Open jbeuckm opened this issue 1 year ago • 1 comments

Here is a working demo using a brute force method of rendering the raster layer to read one pixel. I'm trying to get someone familiar with the render sequence to help fix this since there are a list of people that need the function. Even a hint would be great!

Roadmap:

  • render offscreen and do not interfere with the visible rendered layers
  • render or otherwise read only the query area (not the entire viewport)
  • get a distribution of raster color values within a given rect
  • get a distribution of raster color values within a given polygon

queryRaster

This function seems like part of what happens to find elevation values. Maybe there is a way to generalize the terrain feature to implement this? One difference is that, for my application, the value can not be interpolated. It must return an exact pixel color from the raster image.

jbeuckm avatar Jul 26 '22 12:07 jbeuckm

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

:white_check_mark: jbeuckm
:x: Joe Beuckman


Joe Beuckman seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Jul 26 '22 12:07 CLAassistant