<?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 Applying Symbology to layer through ArcPy script and values are getting changed? in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/applying-symbology-to-layer-through-arcpy-script/m-p/687393#M4702</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P style="color: #242729; background-color: rgba(248, 248, 248, 0.6); border: 0px; margin: 0px 0px 1em;"&gt;I am doing a raster calculation over a hdf file and after that i have to apply symbology on it.When i am applying Symbology to the raster layer through script .its values get changed as compared to the values i am geting when i am doing it manually . Symbology Type : Stretched&lt;/P&gt;&lt;P style="color: #242729; background-color: rgba(248, 248, 248, 0.6); border: 0px; margin: 0px 0px 1em;"&gt;script i am using is as ...&lt;/P&gt;&lt;P style="color: #242729; background-color: rgba(248, 248, 248, 0.6); border: 0px; margin: 0px 0px 1em;"&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;CODE&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-size: 13px;"&gt;import&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; arcpy &lt;/SPAN&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-size: 13px;"&gt;from&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; arcpy&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;sa
&lt;/SPAN&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-size: 13px;"&gt;import&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;*&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;env&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;workspace &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-size: 13px;"&gt;"E:\data"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #2b91af; border: 0px; font-size: 13px;"&gt;CheckOutExtension&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-size: 13px;"&gt;"Spatial"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;)
&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;in_layer &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-size: 13px;"&gt;"E:\data\filename.hdf"
&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #858c93; border: 0px; font-size: 13px;"&gt;#raster calculation&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; 
output&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; floatdivide&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;in_layer&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-size: 13px;"&gt;10000&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;)
&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #858c93; border: 0px; font-size: 13px;"&gt;# applying symbology
&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; lyr &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-size: 13px;"&gt;"output"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;symbolLyr &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; r&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-size: 13px;"&gt;"E:\data\Layer.lyr"
&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #2b91af; border: 0px; font-size: 13px;"&gt;ApplySymbologyFromLayer_management&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;lyr&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; symbolLyr&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;)


&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/CODE&gt;
Applying Script changes the topmost 3 values and changed it to the Min value ,Avg Value and Max Value , As Shown in Screen shot 1.. Max Value : 0.997 , Avg Value : 0.3985, Min Value :-0.2.
In Screen shot 2 we can see the first three values are changed.
&lt;IMG __jive_id="343884" alt="we can see the first three values are changed." class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/343884_eQ66g.png" style="width: 620px; height: 474px;" /&gt;
&lt;SPAN&gt;Screenshot for Process by Arcpy Script&lt;/SPAN&gt;
&lt;SPAN&gt;&lt;IMG __jive_id="343885" alt="" class="image-2 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/343885_1.png" style="height: auto;" /&gt;&lt;/SPAN&gt;
&lt;SPAN&gt;Screenshot for Manual Process&lt;/SPAN&gt;
&lt;SPAN&gt;&lt;IMG __jive_id="343937" alt="" class="image-3 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/343937_2.png" style="height: auto;" /&gt;&lt;/SPAN&gt;
&lt;CODE&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;
&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 04:54:51 GMT</pubDate>
    <dc:creator>RishyaAgarwal</dc:creator>
    <dc:date>2021-12-12T04:54:51Z</dc:date>
    <item>
      <title>Applying Symbology to layer through ArcPy script and values are getting changed?</title>
      <link>https://community.esri.com/t5/developers-questions/applying-symbology-to-layer-through-arcpy-script/m-p/687393#M4702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P style="color: #242729; background-color: rgba(248, 248, 248, 0.6); border: 0px; margin: 0px 0px 1em;"&gt;I am doing a raster calculation over a hdf file and after that i have to apply symbology on it.When i am applying Symbology to the raster layer through script .its values get changed as compared to the values i am geting when i am doing it manually . Symbology Type : Stretched&lt;/P&gt;&lt;P style="color: #242729; background-color: rgba(248, 248, 248, 0.6); border: 0px; margin: 0px 0px 1em;"&gt;script i am using is as ...&lt;/P&gt;&lt;P style="color: #242729; background-color: rgba(248, 248, 248, 0.6); border: 0px; margin: 0px 0px 1em;"&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;CODE&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-size: 13px;"&gt;import&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; arcpy &lt;/SPAN&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-size: 13px;"&gt;from&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; arcpy&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;sa
&lt;/SPAN&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-size: 13px;"&gt;import&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;*&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;env&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;workspace &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-size: 13px;"&gt;"E:\data"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #2b91af; border: 0px; font-size: 13px;"&gt;CheckOutExtension&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-size: 13px;"&gt;"Spatial"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;)
&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;in_layer &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-size: 13px;"&gt;"E:\data\filename.hdf"
&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #858c93; border: 0px; font-size: 13px;"&gt;#raster calculation&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; 
output&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; floatdivide&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;in_layer&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-size: 13px;"&gt;10000&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;)
&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #858c93; border: 0px; font-size: 13px;"&gt;# applying symbology
&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; lyr &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-size: 13px;"&gt;"output"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;symbolLyr &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; r&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-size: 13px;"&gt;"E:\data\Layer.lyr"
&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #2b91af; border: 0px; font-size: 13px;"&gt;ApplySymbologyFromLayer_management&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;lyr&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt; symbolLyr&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;)


&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/CODE&gt;
Applying Script changes the topmost 3 values and changed it to the Min value ,Avg Value and Max Value , As Shown in Screen shot 1.. Max Value : 0.997 , Avg Value : 0.3985, Min Value :-0.2.
In Screen shot 2 we can see the first three values are changed.
&lt;IMG __jive_id="343884" alt="we can see the first three values are changed." class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/343884_eQ66g.png" style="width: 620px; height: 474px;" /&gt;
&lt;SPAN&gt;Screenshot for Process by Arcpy Script&lt;/SPAN&gt;
&lt;SPAN&gt;&lt;IMG __jive_id="343885" alt="" class="image-2 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/343885_1.png" style="height: auto;" /&gt;&lt;/SPAN&gt;
&lt;SPAN&gt;Screenshot for Manual Process&lt;/SPAN&gt;
&lt;SPAN&gt;&lt;IMG __jive_id="343937" alt="" class="image-3 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/343937_2.png" style="height: auto;" /&gt;&lt;/SPAN&gt;
&lt;CODE&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"&gt;
&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:54:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/applying-symbology-to-layer-through-arcpy-script/m-p/687393#M4702</guid>
      <dc:creator>RishyaAgarwal</dc:creator>
      <dc:date>2021-12-12T04:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: Applying Symbology to layer through ArcPy script and values are getting changed?</title>
      <link>https://community.esri.com/t5/developers-questions/applying-symbology-to-layer-through-arcpy-script/m-p/687394#M4703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/apply-symbology-from-layer.htm"&gt;ApplySymbologyFromLayer_management &lt;/A&gt;has an image showing what is dynamic and what to select if you don't want the range output altered.&amp;nbsp; Have you experimented with different options if the current representation isn't to your liking?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Mar 2017 06:33:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/applying-symbology-to-layer-through-arcpy-script/m-p/687394#M4703</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-03-24T06:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: Applying Symbology to layer through ArcPy script and values are getting changed?</title>
      <link>https://community.esri.com/t5/developers-questions/applying-symbology-to-layer-through-arcpy-script/m-p/687395#M4704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am Using Stretched Symbology for Raster but Output Color ramp is showing different values if done by arcpy&lt;/P&gt;&lt;P&gt;Same If i import a layer file manually to raster its color ramp have different values .&lt;/P&gt;&lt;P&gt;Manually process resulting into Color ramp according to my liking bur arcpy method give some different output.&lt;BR /&gt;I searched out&amp;nbsp;in above link but no solution for so is listed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Mar 2017 07:34:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/applying-symbology-to-layer-through-arcpy-script/m-p/687395#M4704</guid>
      <dc:creator>RishyaAgarwal</dc:creator>
      <dc:date>2017-03-24T07:34:22Z</dc:date>
    </item>
  </channel>
</rss>

