<?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 Single Output Map Algebra Question in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/single-output-map-algebra-question/m-p/366364#M28912</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a script that runs a calculation on 5 input rasters to get 4 more rasters, then runs a conditional on each of the 4 rasters before a mosaic of the 4 rasters, and finally a conditional is ran on the mosaic to get my final output raster.&amp;nbsp; This is 10 raster calculations and 9 temp rasters, which can take a long time to process and a lot of hard drive space.&amp;nbsp; Is there any way I can combine my conditional argument with my single output map algebra to reduce the number of raster calculations done to get the same result.&amp;nbsp; An example of my single output map algebra and con statements are below.&amp;nbsp; I know I can combine the two in a raster calculator function, but I don;'t know how to translate this into a script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;# 10 and 25 Log-Linear Interpolation
X25 = ws + "//X25"
gp.SingleOutputMapAlgebra_sa("POW(10 , LOG10(4) - %s * (LOG10(4) - LOG10(10)) / (%s - %s))" %(D25, D25, D10), X25, "'';''")

# Set cells outside of 10-25 range to 0
C25 = ws + "//C25"
gp.Con_sa(X25, 0, C25, X25, "%s &amp;lt;= 4" %(X25))&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Jul 2012 15:01:20 GMT</pubDate>
    <dc:creator>BenRufenacht</dc:creator>
    <dc:date>2012-07-19T15:01:20Z</dc:date>
    <item>
      <title>Single Output Map Algebra Question</title>
      <link>https://community.esri.com/t5/python-questions/single-output-map-algebra-question/m-p/366364#M28912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a script that runs a calculation on 5 input rasters to get 4 more rasters, then runs a conditional on each of the 4 rasters before a mosaic of the 4 rasters, and finally a conditional is ran on the mosaic to get my final output raster.&amp;nbsp; This is 10 raster calculations and 9 temp rasters, which can take a long time to process and a lot of hard drive space.&amp;nbsp; Is there any way I can combine my conditional argument with my single output map algebra to reduce the number of raster calculations done to get the same result.&amp;nbsp; An example of my single output map algebra and con statements are below.&amp;nbsp; I know I can combine the two in a raster calculator function, but I don;'t know how to translate this into a script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;# 10 and 25 Log-Linear Interpolation
X25 = ws + "//X25"
gp.SingleOutputMapAlgebra_sa("POW(10 , LOG10(4) - %s * (LOG10(4) - LOG10(10)) / (%s - %s))" %(D25, D25, D10), X25, "'';''")

# Set cells outside of 10-25 range to 0
C25 = ws + "//C25"
gp.Con_sa(X25, 0, C25, X25, "%s &amp;lt;= 4" %(X25))&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2012 15:01:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/single-output-map-algebra-question/m-p/366364#M28912</guid>
      <dc:creator>BenRufenacht</dc:creator>
      <dc:date>2012-07-19T15:01:20Z</dc:date>
    </item>
  </channel>
</rss>

