Hello Everyone,
Is it the case that colormap raster functions can only render pixel values in the range of 0-255 for raster data? My test results suggest so, as there is no change even when modifying the outputPixelType parameter. I have created a demo to illustrate this, please see: https://codepen.io/xiej/pen/qBvGmMQ?editors=1000 . In this demo, raster values greater than 255 are not displayed. You can click the mouse on the map to view the pixel values at different locations.
This test outcome is beyond my expectations, and I believe colormap raster functions should not be limited to the 0-255 value range.
Thank you so much!
Solved! Go to Solution.
Try setting an appropriate stretch before applying a colomap:
https://codepen.io/john-grayson/pen/WNmqZbq
Try setting an appropriate stretch before applying a colomap:
https://codepen.io/john-grayson/pen/WNmqZbq
Thanks @JohnGrayson , the data can be displayed now, but the problem after applying the stretch is that the legend makes no sense.
If the stretch raster function is not going to be used conjunction with other raster functions to provide additional context to the processing of the pixels, then you might instead just use a stretch renderer if all you need is visualization. I've updated the CodePen to show this simpler alternative.
Okay, thank you very much @JohnGrayson . The solution I provided to my end-users also involves using renderer. However, I am puzzled why raster functions cannot be applied to rasters with pixel values above 255. Maybe it's designed this way, but I couldn't find any documentation explaining it.
HI, @JohnGrayson . The ESRI Support Analyst told me that this is the expected behavior, that is, the colormap only maps pixel values from 0-255. Please see: https://support.esri.com/en-us/bug/the-colormap-to-rgb-raster-function-produces-raster-wit-bug-00011... . Thank you very much for the solution you provided!