Select to view content in your preferred language

Raster stretch color schemes - use grid values rather than percent

1921
5
11-09-2023 06:02 PM
Status: Open
Labels (1)
davedoesgis
Frequent Contributor

This idea relates to the the "Stretch" symbology for raster layers in Pro:

dcafdg_0-1699580967012.png

Problem: The color scheme editor only lets you set colors based on the percent position in the range of values. For most maps I make, I want certain colors assigned to specific values, rather than the percent of the range from min to max.

dcafdg_1-1699893634282.png

Idea: Give us the option to enter specific cell values where the colors change in the Color Scheme Editor (see previous screenshot). This would be in place of the percent "Position" setting if I'm using cell values. It should be able to accept float values with decimal places, since I work with some very small decimal values. I would also like the values to be able to be outside the range of whatever grid I'm working with, since I might have a greater possible range than just this dataset.

 

The work-around: I can create an artificial raster with the theoretical min/max values I'd encounter. Then, I calculate the percent values that correspond to the actual cell value thresholds where the color should change in the continuous color scheme. Next, I apply that symbology to another raster layer and it will maintain those ranges. So I have a work-around, but... why do I have to do all this work! Make it easy for us!

 

Example: On a temperature forecast map, you'll see the same legend every day, even though the range of daily temperatures might vary greatly by season. I just want to make it as easy as possible to create a new color scheme based on grid cell values for the color transitions, rather than percent of the range in that particular grid, which might not reflect the true range of values I will encounter in future data sets.

5 Comments
Simon_Woo

Hello dcafdg,

Have you tried using Advanced Labeling within the Stretched renderer?
https://pro.arcgis.com/en/pro-app/latest/help/data/imagery/advanced-labeling-for-a-continuous-raster...

Sound like what you are trying to achieve.  If not, please let me know what is still missing from your idea.

davedoesgis

@Simon_Woo  - I was aware of it, but I thought it only updated the layer's legend. I didn't realize until just now that it would enable me to edit the symbology for the layer.

It does seem useful, but has some snags. My grid has a minimum value of 0.0016, which it rounds up to 0.002. I multiplied my input data by 100, and that worked, but I really shouldn't have to modify my data around the tool.

Also, the symbology this creates on the map looks good, but the legend is not correct. For example, look at the strong category in the advanced labeling here, which is yellow:

dcafdg_0-1700531435583.png

The label for that category in the legend isn't anywhere near the yellow color.

dcafdg_1-1700531497378.png

The legend just stacks the labels as closely as the font will allow. The color ramp does correspond to what I would expect, or at least it looks good at a glance. Unfortunately, the labels and the colors don't line up at all if your category thresholds are not evenly distributed.

I also wish Advanced Labeling would let me assign a color to a range of values, rather than a threshold cutoff. For example, in the screenshot above, the "Strong" category is for a range of 9.2 to 18, so I entered the mid-point value of 13.6 so that category's color is centered on the range. It's not a big deal to figure this out, but wish I didn't have to try to outsmart it.

Lastly, you can only set thresholds that are in the range of your data. If the data set I have does not contain the full range of possible data, I cannot create symbology that will work for any case, so I have to create a fake data set just to set up my symbology. (This is something that comes up in many more cases than just this with Esri's symbology tools.)

Simon_Woo

I will try to address each of your comments. 


1) Your legend can be controlled by the the Symbology > Advanced Symbology Options > Numeric. unfortunately, there are only 3 decimal places for the Advanced Labeling breaks - but it does honor how ever many decimals you want to use.

2) I see your screenshot and agree it is not matching up.  However each time I try it on my end the labels are fairly correct.  As in, they are correct at the color\value break.  As you mentioned when values are very very close together it may become a bit of a problem.  Plus submit a bug on this so that Support can diagnose this issue better. 

3) You are using a range of values for a class break.  I think the Classify renderer would suit your needs best in this case.  It would solve pretty much every problem you have.  The only downside is that you are placing values into bins\classes than having a subtle change in color between classes.  But it really matters on what is more important to you - classes with labels or a range or values without labels.

4)If you want to set a range larger than what your data contains, you can do that via Custom Statistics.  Just set your min and max values to the range you want.

I know this does not solve all your problems, but it will hopefully help you choose something that we currently support, to help your project out.  In terms of something not working up to expectations - such as issue 2, please log Support issues for each item you feel is not up to working standards.  The advanced labels is supposed to solve what you want to do - so we will continue to build off that and fix the problems that you may encounter. 

 

Thanks for all your feedback
Simon W.

davedoesgis

@Simon_Woo - This did come out of a tech support incident where we hit the limits of what the software could do. The analyst created a couple of entries for various enhancements but also encouraged me to add ideas here. 

Simon_Woo

Thank you for the information. 

So far I only see the one enhancement - ENH-000163094. As I alluded to, the problem with the enhancement request is that the Advanced Labeling is supposed to achieve this overall goal. 

Therefore, I am hoping to "fix" the issues within Advanced Labeling so we can get your workflow to work as much as possible.  Do you have any SF Bug\Issue\Enhancement numbers?  I can look them up to make sure they have been logged.