<?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: How to merge raster files in ArcGIS? in ArcGIS Spatial Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-merge-raster-files-in-arcgis/m-p/263171#M3742</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;The real oldie and goody is &lt;/SPAN&gt;&lt;A href="http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?id=6480&amp;amp;pid=6474&amp;amp;topicname=Merge&amp;amp;" rel="nofollow noopener noreferrer" target="_blank"&gt;merge()&lt;/A&gt;&lt;SPAN&gt;, which with "real" Con was removed at 10.0. (Though the rough edges of the Mosaic tool have been smoothed a bit (haha).&amp;nbsp; Mosaic, being a core raster tool, is not integrated in arcpy map algebra, which is a pity.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;More map-algebra friendly replacements for the old (missing) merge function include:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- CellStatistics with the "DATA" parameter, using an appropriate statistics choice in case there is overlap (For example - "MAXIMUM" or "MEAN")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
CellStatistics([raster1, raster2, raster3], "MEAN", "NODATA")&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- Use Con and IsNull to get the first in the list that is non-NoData &lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Con(^ IsNull(raster1), raster1, Con(^ IsNull(raster2), raster2)))
Con(^ IsNull(raster1), raster1, Con(^ IsNull(raster2), raster2, Con(^ IsNull(raster3), raster3)))&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- You can still use SOMA (this is only supported for backwards compatibility).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
expr = "merge({0}".format(",".join[str(r) for r in [raster1, raster2, raster3]])
tmpras&amp;nbsp; = arcpy.CreateScratchName("","","raster")
outras = Raster(arcpy.gp.SingleOutputMapAlgebra_sa(expr,&amp;nbsp; tmpras))&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please join me and vote this up!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://ideas.arcgis.com/ideaView?id=087E00000004rKY" rel="nofollow noopener noreferrer" target="_blank"&gt;ideas.arcgis.com: Bring back Spatial Analyst Merge tool&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;UPDATE:&lt;/STRONG&gt; I have posted an arcpy map algebra implementation of the old merge() functionality.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/docs/DOC-5821" target="_blank"&gt;Implementing merge() in ArcPy map algebra&lt;/A&gt;​&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 12:54:17 GMT</pubDate>
    <dc:creator>curtvprice</dc:creator>
    <dc:date>2021-12-11T12:54:17Z</dc:date>
    <item>
      <title>How to merge raster files in ArcGIS?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-merge-raster-files-in-arcgis/m-p/263166#M3737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I tried merge function from Map algebra in the Spatial Analysis Toolbox, but doesn't work. who kow how to deal with it? Thanks a lot....&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Apr 2010 04:40:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-merge-raster-files-in-arcgis/m-p/263166#M3737</guid>
      <dc:creator>HaoHuang</dc:creator>
      <dc:date>2010-04-02T04:40:21Z</dc:date>
    </item>
    <item>
      <title>Need more information to help you...</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-merge-raster-files-in-arcgis/m-p/263167#M3738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Without more details or a description of the error you received it's not possible to comment, for example, I assume you are using the &lt;/SPAN&gt;&lt;A href="http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Single_Output_Map_Algebra"&gt;&lt;STRONG&gt;Single Output Map Algebra tool&lt;/STRONG&gt;&lt;/A&gt;&lt;SPAN&gt;?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the meantime, start with:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Your Toolbox &lt;/SPAN&gt;&lt;A href="http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?id=1007&amp;amp;pid=1006&amp;amp;topicname=An_overview_of_geoprocessing_environments"&gt;&lt;STRONG style="font-style: italic;"&gt;ENVIRONMENT settings&lt;/STRONG&gt;&lt;/A&gt;&lt;SPAN&gt;, e.g. input projections and processing output projections, path to output workspace?, etc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Have you tried to use the &lt;/SPAN&gt;&lt;A href="http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?id=1917&amp;amp;pid=1912&amp;amp;topicname=Mosaic_To_New_Raster_(Data_Management)"&gt;&lt;STRONG&gt;Mosaic to New Raster tool&lt;/STRONG&gt;&lt;/A&gt;&lt;SPAN&gt;?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Apr 2010 17:17:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-merge-raster-files-in-arcgis/m-p/263167#M3738</guid>
      <dc:creator>CrystalDorn</dc:creator>
      <dc:date>2010-04-05T17:17:42Z</dc:date>
    </item>
    <item>
      <title>How to merge raster files in ArcGIS?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-merge-raster-files-in-arcgis/m-p/263168#M3739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;ArcToolbox -&amp;gt; Data Management Tools -&amp;gt; Raster -&amp;gt; Raster Dataset -&amp;gt; Mosaic To New Raster&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Apr 2010 12:49:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-merge-raster-files-in-arcgis/m-p/263168#M3739</guid>
      <dc:creator>JakubSisak</dc:creator>
      <dc:date>2010-04-07T12:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to merge raster files in ArcGIS?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-merge-raster-files-in-arcgis/m-p/263169#M3740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;ArcToolbox -&amp;gt; Data Management Tools -&amp;gt; Raster -&amp;gt; Raster Dataset -&amp;gt; Mosaic To New Raster&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yep, that works fine. Thanks a lot!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Oct 2010 11:36:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-merge-raster-files-in-arcgis/m-p/263169#M3740</guid>
      <dc:creator>AsparuhKamburov</dc:creator>
      <dc:date>2010-10-18T11:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to merge raster files in ArcGIS?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-merge-raster-files-in-arcgis/m-p/263170#M3741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for this. An oldie but a goodie.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Aug 2013 12:58:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-merge-raster-files-in-arcgis/m-p/263170#M3741</guid>
      <dc:creator>ToddMacPherson</dc:creator>
      <dc:date>2013-08-22T12:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to merge raster files in ArcGIS?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-merge-raster-files-in-arcgis/m-p/263171#M3742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;The real oldie and goody is &lt;/SPAN&gt;&lt;A href="http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?id=6480&amp;amp;pid=6474&amp;amp;topicname=Merge&amp;amp;" rel="nofollow noopener noreferrer" target="_blank"&gt;merge()&lt;/A&gt;&lt;SPAN&gt;, which with "real" Con was removed at 10.0. (Though the rough edges of the Mosaic tool have been smoothed a bit (haha).&amp;nbsp; Mosaic, being a core raster tool, is not integrated in arcpy map algebra, which is a pity.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;More map-algebra friendly replacements for the old (missing) merge function include:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- CellStatistics with the "DATA" parameter, using an appropriate statistics choice in case there is overlap (For example - "MAXIMUM" or "MEAN")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
CellStatistics([raster1, raster2, raster3], "MEAN", "NODATA")&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- Use Con and IsNull to get the first in the list that is non-NoData &lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Con(^ IsNull(raster1), raster1, Con(^ IsNull(raster2), raster2)))
Con(^ IsNull(raster1), raster1, Con(^ IsNull(raster2), raster2, Con(^ IsNull(raster3), raster3)))&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- You can still use SOMA (this is only supported for backwards compatibility).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
expr = "merge({0}".format(",".join[str(r) for r in [raster1, raster2, raster3]])
tmpras&amp;nbsp; = arcpy.CreateScratchName("","","raster")
outras = Raster(arcpy.gp.SingleOutputMapAlgebra_sa(expr,&amp;nbsp; tmpras))&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please join me and vote this up!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://ideas.arcgis.com/ideaView?id=087E00000004rKY" rel="nofollow noopener noreferrer" target="_blank"&gt;ideas.arcgis.com: Bring back Spatial Analyst Merge tool&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;UPDATE:&lt;/STRONG&gt; I have posted an arcpy map algebra implementation of the old merge() functionality.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/docs/DOC-5821" target="_blank"&gt;Implementing merge() in ArcPy map algebra&lt;/A&gt;​&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:54:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-merge-raster-files-in-arcgis/m-p/263171#M3742</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-12-11T12:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to merge raster files in ArcGIS?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-merge-raster-files-in-arcgis/m-p/263172#M3743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Guys, thanks for all your help &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt; I actually used the Extract by Attributes tool SQL query Where "Rowid" =1 in the end. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;all done and looking good now &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/grin.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2016 00:57:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-merge-raster-files-in-arcgis/m-p/263172#M3743</guid>
      <dc:creator>StephenJordan2</dc:creator>
      <dc:date>2016-07-21T00:57:35Z</dc:date>
    </item>
  </channel>
</rss>

