I’m having trouble chaining this together, but here is what I’d like to accomplish:
- Display a raster as an ImageryLayer from a 3rd-party server (I’ve got this)
- Add the sketch widget and access a polygon the user draws (I think I have this one, too)
- Access the pixel values of all pixels from the raster which are within the user-created polygon
- Calculate/chart data based on the pixel values (check!)
It’s only step 3 that I’m stuck on. Do I somehow need to loop through every pixel in the current extent and test them individually using geometryEngine’s “within” before adding to an array?
I need to do this client-side and can’t perform a server-side rendering rule clip.
I appreciate any help you can provide!