<?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 Accessing DynamicRangeAdjustment Min/Max in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/accessing-dynamicrangeadjustment-min-max/m-p/1604208#M86858</link>
    <description>&lt;P&gt;I'm building a javascript/Typescript/Angular application to view digital elevation model (DEM) data.&amp;nbsp; The source data are Cloud-Optimized Geotiffs (COGs), which are brought in as an ImageryTileLayer with a RasterStretchRenderer.&lt;/P&gt;&lt;P&gt;To render them, I want users to have the following color ramp controls:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;DynamicRangeAdjustment: On/Off (hold)&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Set minimum/maximum values manually [this is working]&lt;/LI&gt;&lt;LI&gt;Use min/max values from entire raster [this is working]&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I think it would be useful to have a way to put a hold on the dynamicRangeAdjustment so that, when turned off, it would preserve the current color ramp settings.&amp;nbsp; However, I can't seem to find where those min/max values are being computed or stored.&lt;/P&gt;&lt;P&gt;Suppose the min/max of the overall dataset is 150.512 m and 401.768 m.&amp;nbsp; These values are accessible via the layer.serviceRasterInfo.statistics[0] object.&amp;nbsp; The renderer.customStatistics[0] object is also usable when I want to set a manual min/max (e.g. 250 m and 310 m).&amp;nbsp; I can toggle the DynamicRangeAdjustment on, which then works normally.&amp;nbsp; When DynamicRangeAdjustment is turned off, though, it reverts to the dataset min/max (or, if I set it, my custom min/max).&amp;nbsp; I'm looking for a way to pull the current values for min/max that DynamicRangeAdjustment is working with, which I will then feed into the custom min/max.&amp;nbsp; Is that possible, and if so, how?&lt;/P&gt;</description>
    <pubDate>Wed, 09 Apr 2025 15:13:19 GMT</pubDate>
    <dc:creator>BillMitchell</dc:creator>
    <dc:date>2025-04-09T15:13:19Z</dc:date>
    <item>
      <title>Accessing DynamicRangeAdjustment Min/Max</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/accessing-dynamicrangeadjustment-min-max/m-p/1604208#M86858</link>
      <description>&lt;P&gt;I'm building a javascript/Typescript/Angular application to view digital elevation model (DEM) data.&amp;nbsp; The source data are Cloud-Optimized Geotiffs (COGs), which are brought in as an ImageryTileLayer with a RasterStretchRenderer.&lt;/P&gt;&lt;P&gt;To render them, I want users to have the following color ramp controls:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;DynamicRangeAdjustment: On/Off (hold)&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Set minimum/maximum values manually [this is working]&lt;/LI&gt;&lt;LI&gt;Use min/max values from entire raster [this is working]&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I think it would be useful to have a way to put a hold on the dynamicRangeAdjustment so that, when turned off, it would preserve the current color ramp settings.&amp;nbsp; However, I can't seem to find where those min/max values are being computed or stored.&lt;/P&gt;&lt;P&gt;Suppose the min/max of the overall dataset is 150.512 m and 401.768 m.&amp;nbsp; These values are accessible via the layer.serviceRasterInfo.statistics[0] object.&amp;nbsp; The renderer.customStatistics[0] object is also usable when I want to set a manual min/max (e.g. 250 m and 310 m).&amp;nbsp; I can toggle the DynamicRangeAdjustment on, which then works normally.&amp;nbsp; When DynamicRangeAdjustment is turned off, though, it reverts to the dataset min/max (or, if I set it, my custom min/max).&amp;nbsp; I'm looking for a way to pull the current values for min/max that DynamicRangeAdjustment is working with, which I will then feed into the custom min/max.&amp;nbsp; Is that possible, and if so, how?&lt;/P&gt;</description>
      <pubDate>Wed, 09 Apr 2025 15:13:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/accessing-dynamicrangeadjustment-min-max/m-p/1604208#M86858</guid>
      <dc:creator>BillMitchell</dc:creator>
      <dc:date>2025-04-09T15:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing DynamicRangeAdjustment Min/Max</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/accessing-dynamicrangeadjustment-min-max/m-p/1604392#M86868</link>
      <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You can use the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryTileLayer.html#fetchPixels" target="_self"&gt;ImageryTileLayer.fetchPixels&lt;/A&gt; method to retrieve information about pixels within the extent. From the returned &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-PixelBlock.html#statistics" target="_self"&gt;PixelBlock&lt;/A&gt;, you can then access the min and max pixel values through its statistics property.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const pixelBlock = await layer.fetchPixels(view.extent, view.width, view.height);
// access pixelBlock.statistics  (minValue and maxValue)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 09 Apr 2025 20:57:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/accessing-dynamicrangeadjustment-min-max/m-p/1604392#M86868</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2025-04-09T20:57:53Z</dc:date>
    </item>
  </channel>
</rss>

