<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Raster Function Template for 8-bit raster with 0 and 1 values in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/raster-function-template-for-8-bit-raster-with-0/m-p/1222202#M61110</link>
    <description>&lt;P&gt;I should mention that I'm on ArcGIS Pro 2.8.3&lt;/P&gt;</description>
    <pubDate>Fri, 14 Oct 2022 20:13:05 GMT</pubDate>
    <dc:creator>Heidi_Kristenson</dc:creator>
    <dc:date>2022-10-14T20:13:05Z</dc:date>
    <item>
      <title>Raster Function Template for 8-bit raster with 0 and 1 values</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/raster-function-template-for-8-bit-raster-with-0/m-p/1222201#M61109</link>
      <description>&lt;P&gt;I can't seem to generate an appropriate raster function template to visualize an 8-bit raster with a Min-Max stretch from 0 to 1 with a color ramp.&lt;/P&gt;&lt;P&gt;I have a collection of 8-bit unsigned rasters that contain only 0 and 1 values (and NoData) that are destined for an image service. I want to generate a raster function template to symbolize the rasters so that 0 values are a 50% transparent white and 1 values are blue. This has proven unbelievably difficult, even though it's very easy to apply such a symbology directly in ArcGIS Pro.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;What I &lt;EM&gt;want&lt;/EM&gt; to replicate is this fairly simple Stretch setting:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Heidi_Kristenson_0-1665775930084.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/53699i7EBD73F9EB14C66E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Heidi_Kristenson_0-1665775930084.png" alt="Heidi_Kristenson_0-1665775930084.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;There's a Min-Max stretch applied, from 0 to 1 (using Custom stats). I've generated a custom discrete multipart color scheme where the low values (encompassing 0) have a 50% transparent white applied, and high values (encompassing 1) are blue.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you simply save this symbology as a Raster Function Template, it saves as a "Rendered Raster" function. This then displays as an RGB image, with no transparency on the white pixels, rather than a stretched raster with values from 0 to 1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Heidi_Kristenson_1-1665776214377.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/53700iDD1F15A4BF9FFF90/image-size/large?v=v2&amp;amp;px=999" role="button" title="Heidi_Kristenson_1-1665776214377.png" alt="Heidi_Kristenson_1-1665776214377.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;There are no settings listed in the parameters; it's completely opaque what sort of rendering is being applied to this raster. The legend simply displays the RGB bands, rather than a color bar with the stretched Min-Max values.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My first thought was to just build a raster function template using first a Stretch function followed by a Colormap function. I tested each component, and if I just apply the Stretch function I can get the basic behavior I want, just in black and white:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Heidi_Kristenson_2-1665776528947.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/53701iC9ED699C82D2ED55/image-size/large?v=v2&amp;amp;px=999" role="button" title="Heidi_Kristenson_2-1665776528947.png" alt="Heidi_Kristenson_2-1665776528947.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It seems like I should be able to simply add the Colormap function to apply my custom color scheme, and the black-to-white color ramp would be replaced with my transparent white and blue color ramp. But when I do that, the scaling reverts to 0 to 255. As such, both 0 and 1 are in the transparent white region of the color ramp.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Heidi_Kristenson_3-1665776723797.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/53702i37E4C1DDF280C554/image-size/large?v=v2&amp;amp;px=999" role="button" title="Heidi_Kristenson_3-1665776723797.png" alt="Heidi_Kristenson_3-1665776723797.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It also changes the legend display to a discrete display, where every number from 0 to 255 has a color patch, rather than just displaying the stretch colorbar. Incidentally, it only displays the transparent white from 0-19, the blue from 20-39, then displays a range of green to red colors for the remaining 40-255 (not sure what's driving that, seeing as I only set 2 colors in the multipart ramp settings).&lt;/P&gt;&lt;P&gt;I tried adjusting the color ramp so that 0 and 1 would have different colors, but it's pretty tricky because they're so close together in the scope of 0 to 255. And even so, the legend is unwieldy. I'd like to just see the colorbar like I do when I manually set the symbology.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried switching the order of the colorbar and stretch functions, but that wasn't helpful.&lt;/P&gt;&lt;P&gt;I also tried exporting a Classified Symbology setup as a RFT, but again, it just saves that symbology as a Rendered Raster setting, so it's just an RGB output, with no transparency capabilities or legend.&lt;/P&gt;&lt;P&gt;Any ideas?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 20:14:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/raster-function-template-for-8-bit-raster-with-0/m-p/1222201#M61109</guid>
      <dc:creator>Heidi_Kristenson</dc:creator>
      <dc:date>2022-10-14T20:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: Raster Function Template for 8-bit raster with 0 and 1 values</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/raster-function-template-for-8-bit-raster-with-0/m-p/1222202#M61110</link>
      <description>&lt;P&gt;I should mention that I'm on ArcGIS Pro 2.8.3&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 20:13:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/raster-function-template-for-8-bit-raster-with-0/m-p/1222202#M61110</guid>
      <dc:creator>Heidi_Kristenson</dc:creator>
      <dc:date>2022-10-14T20:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: Raster Function Template for 8-bit raster with 0 and 1 values</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/raster-function-template-for-8-bit-raster-with-0/m-p/1222209#M61111</link>
      <description>&lt;P&gt;I've made a bit of progress by using a custom .clr file:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Heidi_Kristenson_0-1665779076286.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/53704iF5675AE8DB8341A9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Heidi_Kristenson_0-1665779076286.png" alt="Heidi_Kristenson_0-1665779076286.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I just generated a text file with a line each for the two values in my raster, and defined a color for each one.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the closest I've come to what I'm looking for, but it doesn't seem to support transparency. Any suggestions on that front would be welcome.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Heidi_Kristenson_1-1665779370014.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/53705i6892A0439C0E4C9F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Heidi_Kristenson_1-1665779370014.png" alt="Heidi_Kristenson_1-1665779370014.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I also would love to be able to rename the values that display next to the legend (i.e. display "Water" instead of "1"), which can't be designated within the .clr file.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 21:57:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/raster-function-template-for-8-bit-raster-with-0/m-p/1222209#M61111</guid>
      <dc:creator>Heidi_Kristenson</dc:creator>
      <dc:date>2022-10-14T21:57:53Z</dc:date>
    </item>
    <item>
      <title>Re: Raster Function Template for 8-bit raster with 0 and 1 values</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/raster-function-template-for-8-bit-raster-with-0/m-p/1222235#M61114</link>
      <description>&lt;P&gt;Will the colormap import accept an alpha value of .5 (1 0 169 230 .5) for the transparency?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 22:43:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/raster-function-template-for-8-bit-raster-with-0/m-p/1222235#M61114</guid>
      <dc:creator>LindaWilliams1</dc:creator>
      <dc:date>2022-10-14T22:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: Raster Function Template for 8-bit raster with 0 and 1 values</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/raster-function-template-for-8-bit-raster-with-0/m-p/1222241#M61116</link>
      <description>&lt;P&gt;The Colormap function doesn't seem to apply transparencies &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/123636"&gt;@LindaWilliams1&lt;/a&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried adding transparency values at the end of my .clr file entries, but it didn't make any difference in the output; everything was still fully opaque.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Heidi_Kristenson_0-1665788361085.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/53709iB6B09AE46554AFE3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Heidi_Kristenson_0-1665788361085.png" alt="Heidi_Kristenson_0-1665788361085.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 23:00:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/raster-function-template-for-8-bit-raster-with-0/m-p/1222241#M61116</guid>
      <dc:creator>Heidi_Kristenson</dc:creator>
      <dc:date>2022-10-14T23:00:00Z</dc:date>
    </item>
  </channel>
</rss>

