<?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: Pansharpened Raster Color Changes After Clipping in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/pansharpened-raster-color-changes-after-clipping/m-p/665848#M51698</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried that but applying symbology does not change anything. They still look different.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Jun 2018 20:11:38 GMT</pubDate>
    <dc:creator>Md_Abdullah_All_Sourav</dc:creator>
    <dc:date>2018-06-22T20:11:38Z</dc:date>
    <item>
      <title>Pansharpened Raster Color Changes After Clipping</title>
      <link>https://community.esri.com/t5/python-questions/pansharpened-raster-color-changes-after-clipping/m-p/665846#M51696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: rgba(248, 248, 248, 0.6);"&gt;I have a mosaic raster of an agricultural area. In the mosaic raster, a specific agricultural field (field no. 5) looks just like this&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: rgba(248, 248, 248, 0.6);"&gt;&lt;SPAN&gt;&lt;IMG class="image-1 j-img-centered jive-image" height="294" src="https://community.esri.com/legacyfs/online/412089_pastedImage_1.png" style="display: block; margin-left: auto; margin-right: auto;" width="312" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: rgba(248, 248, 248, 0.6);"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: rgba(248, 248, 248, 0.6);"&gt;&lt;SPAN&gt;When I clip the raster with the field's shapefile (shapefile of the field no. 5) the color changes a bit and looks like the following image.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: rgba(248, 248, 248, 0.6);"&gt;&lt;SPAN&gt;&lt;IMG class="image-2 j-img-centered jive-image" height="300" src="https://community.esri.com/legacyfs/online/412090_pastedImage_4.png" style="display: block; margin-left: auto; margin-right: auto;" width="314" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: rgba(248, 248, 248, 0.6);"&gt;&lt;SPAN&gt;The following codes have been used to clip the mosaic raster -&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;#clipping the raster&lt;BR /&gt; arcpy.Clip_management(in_raster= mosaic_pan_layer, rectangle=str(extent_of_shape_file), &lt;BR /&gt; out_raster=pan_save, in_template_dataset=shape_file, nodata_value="65536", &lt;BR /&gt; clipping_geometry="ClippingGeometry", maintain_clipping_extent="NO_MAINTAIN_EXTENT")&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;#saving the clipped raster&lt;BR /&gt;arcpy.CopyRaster_management (in_raster = pan_save, out_rasterdataset = Clipped_pan_save, nodata_value = "9999")&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also have done the following -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: rgba(248, 248, 248, 0.6);"&gt;-&amp;nbsp;mosaic image &amp;gt; properties &amp;gt; symbology &amp;gt; save the statistics in xml . Then&amp;nbsp;went&amp;nbsp;to the symbology of the&amp;nbsp;clipped result image &amp;gt; "rgb composite"&amp;gt; type = "custom" &amp;gt; statistics =&amp;nbsp; "from custom settings", and loaded the statistics using xml.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: rgba(248, 248, 248, 0.6);"&gt;Here is the results -&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: rgba(248, 248, 248, 0.6);"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: rgba(248, 248, 248, 0.6);"&gt;&lt;IMG class="image-3 jive-image" height="367" src="https://community.esri.com/legacyfs/online/412095_pastedImage_15.png" width="670" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: rgba(248, 248, 248, 0.6);"&gt;The result is -&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: rgba(248, 248, 248, 0.6);"&gt;&lt;IMG class="j-img-centered jive-image image-4" height="195" src="https://community.esri.com/legacyfs/online/412096_pastedImage_16.png" style="display: block; margin-left: auto; margin-right: auto;" width="384" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: rgba(248, 248, 248, 0.6);"&gt;&lt;SPAN&gt;&lt;SPAN style="background-color: rgba(248, 248, 248, 0.6);"&gt;The mosaic image has some black portion where the pixel values are 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: rgba(248, 248, 248, 0.6);"&gt;&lt;SPAN style="background-color: rgba(248, 248, 248, 0.6);"&gt;&lt;IMG class="image-5 j-img-centered jive-image" height="169" src="https://community.esri.com/legacyfs/online/412098_pastedImage_18.png" style="display: block; margin-left: auto; margin-right: auto;" width="348" /&gt;Is there any way to get the clipped raster to look exactly the same as the mosaic layer?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2018 18:16:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/pansharpened-raster-color-changes-after-clipping/m-p/665846#M51696</guid>
      <dc:creator>Md_Abdullah_All_Sourav</dc:creator>
      <dc:date>2018-06-22T18:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: Pansharpened Raster Color Changes After Clipping</title>
      <link>https://community.esri.com/t5/python-questions/pansharpened-raster-color-changes-after-clipping/m-p/665847#M51697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hmmmm sounds like you need to save the symbology from the original, then&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://pro.arcgis.com/en/pro-app/tool-reference/data-management/apply-symbology-from-layer.htm" title="http://pro.arcgis.com/en/pro-app/tool-reference/data-management/apply-symbology-from-layer.htm"&gt;Apply Symbology From Layer—Data Management toolbox | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2018 18:26:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/pansharpened-raster-color-changes-after-clipping/m-p/665847#M51697</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-06-22T18:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: Pansharpened Raster Color Changes After Clipping</title>
      <link>https://community.esri.com/t5/python-questions/pansharpened-raster-color-changes-after-clipping/m-p/665848#M51698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried that but applying symbology does not change anything. They still look different.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2018 20:11:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/pansharpened-raster-color-changes-after-clipping/m-p/665848#M51698</guid>
      <dc:creator>Md_Abdullah_All_Sourav</dc:creator>
      <dc:date>2018-06-22T20:11:38Z</dc:date>
    </item>
    <item>
      <title>Re: Pansharpened Raster Color Changes After Clipping</title>
      <link>https://community.esri.com/t5/python-questions/pansharpened-raster-color-changes-after-clipping/m-p/665849#M51699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the range of values changed and the symbology doesn't then they would appear different since the range of colours would be different.&amp;nbsp; You want the coloration to stay the same which means it would not be dependent on the values but only the range.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Jun 2018 00:59:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/pansharpened-raster-color-changes-after-clipping/m-p/665849#M51699</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-06-23T00:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: Pansharpened Raster Color Changes After Clipping</title>
      <link>https://community.esri.com/t5/python-questions/pansharpened-raster-color-changes-after-clipping/m-p/665850#M51700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The first thing is to make sure no values was changed. You do this by identify a few points when both rasters are visible and the identify option is visible layers.&lt;/P&gt;&lt;P&gt;Then you need to transfer the symbology. I found the easiest way to do it is to save lyr file from the original image and set the data source to the new one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have Fun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Jun 2018 05:52:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/pansharpened-raster-color-changes-after-clipping/m-p/665850#M51700</guid>
      <dc:creator>ModyBuchbinder</dc:creator>
      <dc:date>2018-06-24T05:52:39Z</dc:date>
    </item>
  </channel>
</rss>

