<?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 using raster calculator for stack of raster layers in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/using-raster-calculator-for-stack-of-raster-layers/m-p/406922#M32033</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ArcPy users,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a bit of problem in my script. I am working with MODIS data, and I already have a stack of raster layers. I want to rescale my MODIS data (stack layers) but whenever I use the raster calculator or the divide function in Math the output is converted into single band. I have 10 bands(rasters) stacked in each of my TIFF files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;out_Div = out_ws + "MOD_" + date_parse + "_clip_Geo_rescale" + ".tif"
outDivide = Divide(bands_WGS, 10000.00)
outDivide.save(out_Div)&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bands_WGS is a stack of 10 rasters. When I execute this the output is converted into a single band. Not a stack of rasters divided by 10000.00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope my query is clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for any help.&lt;/P&gt;&lt;P&gt;-Leo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 18:30:35 GMT</pubDate>
    <dc:creator>Leo_KrisPalao</dc:creator>
    <dc:date>2021-12-11T18:30:35Z</dc:date>
    <item>
      <title>using raster calculator for stack of raster layers</title>
      <link>https://community.esri.com/t5/python-questions/using-raster-calculator-for-stack-of-raster-layers/m-p/406922#M32033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ArcPy users,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a bit of problem in my script. I am working with MODIS data, and I already have a stack of raster layers. I want to rescale my MODIS data (stack layers) but whenever I use the raster calculator or the divide function in Math the output is converted into single band. I have 10 bands(rasters) stacked in each of my TIFF files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;out_Div = out_ws + "MOD_" + date_parse + "_clip_Geo_rescale" + ".tif"
outDivide = Divide(bands_WGS, 10000.00)
outDivide.save(out_Div)&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bands_WGS is a stack of 10 rasters. When I execute this the output is converted into a single band. Not a stack of rasters divided by 10000.00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope my query is clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for any help.&lt;/P&gt;&lt;P&gt;-Leo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:30:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-raster-calculator-for-stack-of-raster-layers/m-p/406922#M32033</guid>
      <dc:creator>Leo_KrisPalao</dc:creator>
      <dc:date>2021-12-11T18:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: using raster calculator for stack of raster layers</title>
      <link>https://community.esri.com/t5/python-questions/using-raster-calculator-for-stack-of-raster-layers/m-p/406923#M32034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe you need to separate the bands and then run the divide on each band raster.&amp;nbsp; You can try using composite band tool to create 10 raster layers for each band &amp;gt; divide them and stack them again in once single .tif image using composite band again. There may be other solutions using python. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this is helpful&lt;/P&gt;&lt;P&gt;Kishor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2015 11:28:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-raster-calculator-for-stack-of-raster-layers/m-p/406923#M32034</guid>
      <dc:creator>KishorGhatage</dc:creator>
      <dc:date>2015-04-17T11:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: using raster calculator for stack of raster layers</title>
      <link>https://community.esri.com/t5/python-questions/using-raster-calculator-for-stack-of-raster-layers/m-p/406924#M32035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would agree with Kishor that you need to work with the individual bands, which makes sense logically based on what you are asking the software to do.&amp;nbsp; By trying to divide a multiband raster, you are asking the software to divide each individual band by 10000, which will create 10 new datasets, and then to composite these 10 new datasets into a new multiband raster.&amp;nbsp; In the case of Divide, it is simply a mathematical operator and lacks the complex programming necessary to complete such an operation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2015 12:47:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-raster-calculator-for-stack-of-raster-layers/m-p/406924#M32035</guid>
      <dc:creator>GabrielUpchurch1</dc:creator>
      <dc:date>2015-04-17T12:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: using raster calculator for stack of raster layers</title>
      <link>https://community.esri.com/t5/python-questions/using-raster-calculator-for-stack-of-raster-layers/m-p/406925#M32036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kishor, thanks for your suggestion. This confirms what I have in mind.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;P&gt;-Leo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2015 08:39:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-raster-calculator-for-stack-of-raster-layers/m-p/406925#M32036</guid>
      <dc:creator>Leo_KrisPalao</dc:creator>
      <dc:date>2015-04-20T08:39:16Z</dc:date>
    </item>
  </channel>
</rss>

