<?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: How to render an ImageryLayer with a RasterStretchRenderer in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-render-an-imagerylayer-with-a/m-p/587654#M54897</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This issue will be fixed at 4.16 which is planned to be released sometime early July.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;-Undral&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 28 Jun 2020 03:11:54 GMT</pubDate>
    <dc:creator>UndralBatsukh</dc:creator>
    <dc:date>2020-06-28T03:11:54Z</dc:date>
    <item>
      <title>How to render an ImageryLayer with a RasterStretchRenderer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-render-an-imagerylayer-with-a/m-p/587651#M54894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to render an &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html"&gt;ImageryLayer&lt;/A&gt; by assigning it a &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html"&gt;Renderer&lt;/A&gt; to stylize it. I'm using a &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html"&gt;RasterStretchRenderer&lt;/A&gt; but it is not behaving as I would expect. Here is a &lt;A href="https://codepen.io/ryansutc/pen/WNrwWKe?editors=0010"&gt;CodePen sample&lt;/A&gt; of what I've got set up.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I expected that if I changed the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#statistics"&gt;statistics &lt;/A&gt;```min``` or ```max``` values in my codePen the colors would change as per below from ArcMap:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set to 0 - 3000&lt;/P&gt;&lt;P&gt;&lt;IMG alt="arcMap 0 - 3000 statistics" class="jive-emoji image-1 jive-image" height="407" src="https://community.esri.com/legacyfs/online/496579_mtBaldy_3k.png" width="629" /&gt;&lt;/P&gt;&lt;P&gt;Now change the max to 2000:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="image 2k" class="jive-emoji image-2 jive-image" height="403" src="https://community.esri.com/legacyfs/online/496760_mtBaldy_2k.png" width="637" /&gt;&lt;/P&gt;&lt;P&gt;I want my example to behave akin to this &lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/layers-tileimagerylayer/index.html"&gt;ESRI JS Sample&lt;/A&gt; when you adjust the slider on the "min-max" stretch type for a &lt;STRONG&gt;TileImageryLayer&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#statistics"&gt;statistics&lt;/A&gt; properties I'm setting have no effect. The stretch is always based on the min, max values of the data itself. I'm thinking the problem has something to do with me not understanding how to set that up. I've also looked at the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#outputMin"&gt;OutputMin&lt;/A&gt;, &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#outputMax"&gt;OutputMax&lt;/A&gt; values, and can't understand what they are doing. Changing the latter has similar effects to above but the numbers are all wrong. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any advice, thoughts is welcome.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2020 04:31:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-render-an-imagerylayer-with-a/m-p/587651#M54894</guid>
      <dc:creator>RyanSutcliffe</dc:creator>
      <dc:date>2020-06-16T04:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to render an ImageryLayer with a RasterStretchRenderer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-render-an-imagerylayer-with-a/m-p/587652#M54895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the detailed explanation and reproducible case. It made is easy to track down the issue. You discovered an issue in the API. We will get this issue fixed and I will let you know once it is fixed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the problem you are running into is this. You are setting the renderer on the server side for an ImageryLayer via its raster functions. We are not converting the statistics object to the server side statistics properly.&amp;nbsp; The renderer will work as expected if you change your statistics definition from:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;statistics&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
 min&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;500&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;//CHANGE ME, SEE IF COLORS CHANGE&lt;/SPAN&gt;
 max&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;3000&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;//CHANGE ME, SEE IF COLORS CHANGE&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To:&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;//min, max, avg, stddev&lt;/SPAN&gt;
statistics&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;500&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;3000&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1000&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;505&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps and thanks for bringing this issue to our attention.&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Undral&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:14:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-render-an-imagerylayer-with-a/m-p/587652#M54895</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2021-12-12T01:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to render an ImageryLayer with a RasterStretchRenderer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-render-an-imagerylayer-with-a/m-p/587653#M54896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your response and clarification. To be clear for anyone else looking at this: I don't think the "avg", "stddev" values have any effect on rendering using the "min/max" method; they just need to be set for the REST request to work properly. I believe it's sufficient to set them as 0 as a placeholder. Correct me if I'm wrong though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Followup: If you have any advice on what OutputMin, OutputMax do that would be great. Documentation says:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;The outputMin denotes the output minimum, which is the lowest pixel value for the histogram. The &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#outputMin"&gt;outputMin&lt;/A&gt; and &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-RasterStretchRenderer.html#outputMax"&gt;outputMax&lt;/A&gt; will set the range of values that will then be linearly contrast stretched.&lt;/BLOCKQUOTE&gt;&lt;P&gt;But its not clear to me how that is supposed to be used.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2020 18:30:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-render-an-imagerylayer-with-a/m-p/587653#M54896</guid>
      <dc:creator>RyanSutcliffe</dc:creator>
      <dc:date>2020-06-17T18:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to render an ImageryLayer with a RasterStretchRenderer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-render-an-imagerylayer-with-a/m-p/587654#M54897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This issue will be fixed at 4.16 which is planned to be released sometime early July.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;-Undral&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Jun 2020 03:11:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-render-an-imagerylayer-with-a/m-p/587654#M54897</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2020-06-28T03:11:54Z</dc:date>
    </item>
  </channel>
</rss>

