<?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 Controling raster precision (pixel type) in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/controling-raster-precision-pixel-type/m-p/682447#M38720</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm running some raster calculations (spatial analyst, using Python, v10.2.2) and get massive 64-bit double precision rasters &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;as default output.&amp;nbsp; Is there any way to force single precision or 32-bit depth aside from this approach:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]1. run the calculation e.g. &lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;r1 = FocalStatistics(inputRaster, nbrValue, statistic, "DATA")
outRas = (r1 / 63.5) &lt;/PRE&gt;&lt;SPAN&gt; where inputRaster is an unsigned 8-bit raster &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Convert outRas to an integer by multiplying by 1,000, then rounding to keep only the first 3 decimal places&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Converting back to float (32-bit hopefully) by dividing by 1,000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4. Saving to output format (file GDB or GeoTIFF)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any other way to control pixel type than this?&amp;nbsp; Thoughts/insights appreciated!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Lisa&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 04:42:37 GMT</pubDate>
    <dc:creator>LisaNelson</dc:creator>
    <dc:date>2021-12-12T04:42:37Z</dc:date>
    <item>
      <title>Controling raster precision (pixel type)</title>
      <link>https://community.esri.com/t5/data-management-questions/controling-raster-precision-pixel-type/m-p/682447#M38720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm running some raster calculations (spatial analyst, using Python, v10.2.2) and get massive 64-bit double precision rasters &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;as default output.&amp;nbsp; Is there any way to force single precision or 32-bit depth aside from this approach:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]1. run the calculation e.g. &lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;r1 = FocalStatistics(inputRaster, nbrValue, statistic, "DATA")
outRas = (r1 / 63.5) &lt;/PRE&gt;&lt;SPAN&gt; where inputRaster is an unsigned 8-bit raster &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Convert outRas to an integer by multiplying by 1,000, then rounding to keep only the first 3 decimal places&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Converting back to float (32-bit hopefully) by dividing by 1,000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4. Saving to output format (file GDB or GeoTIFF)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any other way to control pixel type than this?&amp;nbsp; Thoughts/insights appreciated!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Lisa&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:42:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/controling-raster-precision-pixel-type/m-p/682447#M38720</guid>
      <dc:creator>LisaNelson</dc:creator>
      <dc:date>2021-12-12T04:42:37Z</dc:date>
    </item>
  </channel>
</rss>

