<?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: Clipped raster cell values differ from original in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/clipped-raster-cell-values-differ-from-original/m-p/689905#M53454</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;SPAN style="color: #4d4d4d; background-color: #ffffff;"&gt;NO_MAINTAIN_EXTENT —The cell alignment of the input raster will be maintained and the output extent will be adjusted accordingly.&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The description for the tool describes several examples where the extent and/or cell size can be altered during the process.&amp;nbsp; Your code example provides several opportunities for that to occur.&amp;nbsp; It might be worth while to experiment by setting your environment parameters explicitly in the code (ie cell size, alignment and the clip extent)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Aug 2020 20:07:47 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2020-08-05T20:07:47Z</dc:date>
    <item>
      <title>Clipped raster cell values differ from original</title>
      <link>https://community.esri.com/t5/python-questions/clipped-raster-cell-values-differ-from-original/m-p/689904#M53453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV class="" data-value="0"&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class="" data-post-id="370652"&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;I am using python and clipping a tif with the &lt;A href="https://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/clip.htm" rel="nofollow noreferrer"&gt;clip tool&lt;/A&gt;. However, the output (clipped) raster is altered. The raster properties appear identical, both 16bit signed. Cell sizes are the same etc. Here is the relevant code including environment parameters:&lt;/P&gt;&lt;PRE class=""&gt;&lt;CODE&gt;&lt;SPAN class=""&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;env&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;compression &lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt; &lt;/SPAN&gt;&lt;SPAN class=""&gt;"NONE"&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE class=""&gt;&lt;CODE&gt;&lt;SPAN class=""&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;env&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;pyramid &lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt; &lt;/SPAN&gt;&lt;SPAN class=""&gt;"NONE"&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE class=""&gt;&lt;CODE&gt;&lt;SPAN class=""&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;Clip_management&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;pl_rasters&lt;/SPAN&gt;&lt;SPAN class=""&gt;[&lt;/SPAN&gt;&lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN class=""&gt;],&lt;/SPAN&gt;&lt;SPAN class=""&gt; buffExtentStrip&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;SPAN class=""&gt; pluvial_final&lt;/SPAN&gt;&lt;SPAN class=""&gt;+&lt;/SPAN&gt;&lt;SPAN class=""&gt;".tif"&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;SPAN class=""&gt;nodata_value&lt;/SPAN&gt;&lt;SPAN class=""&gt;=-&lt;/SPAN&gt;&lt;SPAN class=""&gt;9999&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;SPAN class=""&gt;maintain_clipping_extent&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"NO_MAINTAIN_EXTENT"&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The following images show the original and clipped.&lt;/P&gt;&lt;P&gt;Original:&lt;/P&gt;&lt;P&gt;&lt;A href="https://i.stack.imgur.com/WmxLd.png" rel="nofollow noreferrer"&gt;&lt;IMG alt="enter image description here" src="https://i.stack.imgur.com/WmxLd.png" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Clipped:&lt;/P&gt;&lt;P&gt;&lt;A href="https://i.stack.imgur.com/pR9pK.png" rel="nofollow noreferrer"&gt;&lt;IMG alt="enter image description here" src="https://i.stack.imgur.com/pR9pK.png" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Any help is greatly appreciated.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2020 19:41:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/clipped-raster-cell-values-differ-from-original/m-p/689904#M53453</guid>
      <dc:creator>JoeBriggs1</dc:creator>
      <dc:date>2020-08-05T19:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: Clipped raster cell values differ from original</title>
      <link>https://community.esri.com/t5/python-questions/clipped-raster-cell-values-differ-from-original/m-p/689905#M53454</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;SPAN style="color: #4d4d4d; background-color: #ffffff;"&gt;NO_MAINTAIN_EXTENT —The cell alignment of the input raster will be maintained and the output extent will be adjusted accordingly.&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The description for the tool describes several examples where the extent and/or cell size can be altered during the process.&amp;nbsp; Your code example provides several opportunities for that to occur.&amp;nbsp; It might be worth while to experiment by setting your environment parameters explicitly in the code (ie cell size, alignment and the clip extent)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2020 20:07:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/clipped-raster-cell-values-differ-from-original/m-p/689905#M53454</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-08-05T20:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: Clipped raster cell values differ from original</title>
      <link>https://community.esri.com/t5/python-questions/clipped-raster-cell-values-differ-from-original/m-p/689906#M53455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;resolved?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2020 22:43:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/clipped-raster-cell-values-differ-from-original/m-p/689906#M53455</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-08-18T22:43:55Z</dc:date>
    </item>
  </channel>
</rss>

