<?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: Clip converts my 16bit unsigned data to 32 bit - bug ? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/clip-converts-my-16bit-unsigned-data-to-32-bit-bug/m-p/674338#M52144</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;i've now found that there most probably is an error in the Clip routine, which by the way also migrate into "Extract by mask" !&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My data contained the value of 0 and had a NoData value assigned to 65536.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I could fortunately in this case consider my value of 0 as NoData, and thus circumvent the problem by using&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Clip_management(inName,"#",outRaster,maskLYR,"0","ClippingGeometry")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rather than&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Clip_management(inName,"#",outRaster,maskLYR,"","ClippingGeometry") &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Michael&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Apr 2011 10:46:48 GMT</pubDate>
    <dc:creator>MichaelStjernholm</dc:creator>
    <dc:date>2011-04-06T10:46:48Z</dc:date>
    <item>
      <title>Clip converts my 16bit unsigned data to 32 bit - bug ?</title>
      <link>https://community.esri.com/t5/python-questions/clip-converts-my-16bit-unsigned-data-to-32-bit-bug/m-p/674337#M52143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm processing a huge bunch of large images. A part of the operation is to use Clip_management to cut-out a part of the image using a vector feature. Unfortunately Clip always produce a 32-bit unsigned int despite the input is 16-bit unsigned int. I use tiff as output&amp;nbsp; format and have tried to set the compression to both "NONE" and LZ77" without any luck&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I force 16-bit output without having to use the processing costly route of:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.CreateRasterDataset_management(path, filename,PixSiz,pixelType.get(str(ValueType),"16_BIT_UNSIGNED"),outputSR, nBands)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;followed by&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.Mosaic_management operation - which beside adding an extra processing step also become quite computing intensive as you can't prohibit pyramids building when having images larger than your screen size or similar !&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem seems specifically related to the "Clipping with geometry", which I need to use as I :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;a) neeed to reduce size to minimu&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;b) later need to calculate the histogram for a specific area using BuildRasterAttributeTable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The help does include a warning "If Clipping Geometry is used, then the pixel depth of the output may be promoted. " - But it is not clear when and why the change happens &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it in reality a bug seen by others ? I run win7 on 64-bit, Arc 10 SP1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;All ideas are welcomed&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Michael&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2011 06:28:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/clip-converts-my-16bit-unsigned-data-to-32-bit-bug/m-p/674337#M52143</guid>
      <dc:creator>MichaelStjernholm</dc:creator>
      <dc:date>2011-04-06T06:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: Clip converts my 16bit unsigned data to 32 bit - bug ?</title>
      <link>https://community.esri.com/t5/python-questions/clip-converts-my-16bit-unsigned-data-to-32-bit-bug/m-p/674338#M52144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;i've now found that there most probably is an error in the Clip routine, which by the way also migrate into "Extract by mask" !&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My data contained the value of 0 and had a NoData value assigned to 65536.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I could fortunately in this case consider my value of 0 as NoData, and thus circumvent the problem by using&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Clip_management(inName,"#",outRaster,maskLYR,"0","ClippingGeometry")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rather than&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Clip_management(inName,"#",outRaster,maskLYR,"","ClippingGeometry") &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Michael&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2011 10:46:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/clip-converts-my-16bit-unsigned-data-to-32-bit-bug/m-p/674338#M52144</guid>
      <dc:creator>MichaelStjernholm</dc:creator>
      <dc:date>2011-04-06T10:46:48Z</dc:date>
    </item>
    <item>
      <title>Re: Clip converts my 16bit unsigned data to 32 bit - bug ?</title>
      <link>https://community.esri.com/t5/python-questions/clip-converts-my-16bit-unsigned-data-to-32-bit-bug/m-p/674339#M52145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Michael,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please take a look at this KB article:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;FAQ:&amp;nbsp; Why does the data bit depth increase when a raster is projected, rotated, or clipped?&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://support.esri.com/en/knowledgebase/techarticles/detail/28470"&gt;http://support.esri.com/en/knowledgebase/techarticles/detail/28470&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If your raster contains values that range from 0 to 65535, ArcMap may assign the raster a NoData value of 65536 pushing the bit requirement up to 32.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If your data does not span the entire 0 to 65535 you can specify a no data value within the range allowing ArcMap to output a 16 bit raster.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Melanie&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jan 2013 16:54:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/clip-converts-my-16bit-unsigned-data-to-32-bit-bug/m-p/674339#M52145</guid>
      <dc:creator>MelanieSummers</dc:creator>
      <dc:date>2013-01-03T16:54:05Z</dc:date>
    </item>
  </channel>
</rss>

