Hi,
With the PixelBlock class, it is possible to access pixels from an imagery layer from the client side (for example like this ImageryLayer - client side pixel filter | ArcGIS API for JavaScript 4.13 ). Is it possible to 'clip' or 'filter' a pixelBlock, so only the pixels are returned which are within a geometry?
What I have in mind is something like this:
pixelsInGeometry = pixelData.pixelBlock.clip(geometry)
... but I did not find a method in the PixelBlock class to achieve this.
I would highly appreciate any ideas of suggestions.
Kind Regards
Lukas
Solved! Go to Solution.
Hi there,
Client side clipping is not possible for ImageryLayer. Most likely you know that the clipping can be done on the server side. But just in case, I am including this info. You can clip the images on the server side by setting ImageryLayer's renderingRule. As you can see from this image service REST doc, the clip is one of the supported raster functions on image services.
Hope this helps,
-Undral
Hi there,
Client side clipping is not possible for ImageryLayer. Most likely you know that the clipping can be done on the server side. But just in case, I am including this info. You can clip the images on the server side by setting ImageryLayer's renderingRule. As you can see from this image service REST doc, the clip is one of the supported raster functions on image services.
Hope this helps,
-Undral
Thank you for clarifying that clipping is not possible on the client. Also thanks for the hint about the Raster Functions.
If you allow me a follow-up question: Is it possible to summarize 'statistics' of an image layer within a user supplied geometry (ideally on the client side)? This example brought me on the idea, but maybe it is not possible.
Else I believe I can do that with the rest API like this.