<?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 mosaic to new raster - how to mosaic rasters in different directories in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/mosaic-to-new-raster-how-to-mosaic-rasters-in/m-p/742202#M57366</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone help with figuring out how to list multiple rasters that are each saved in different folders for using within the mosaic to new raster tool?&amp;nbsp; Can't figure this out after much searching and testing.&amp;nbsp; I've tried putting the input rasters in brackets, in quotes,without quotes... I just keep getting an invalid syntax warning Failed to execute (MosaicToNewRaster)..&amp;nbsp; The example in the help file only lists one raster as the input raster and so I nominate it for worst help file - why would you want to mosaic a single raster?!?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-DJ&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;----------&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcgisscripting&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;gp = arcgisscripting.create(9.3)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;workspace = r"Z:\Climate"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.workspace = workspace&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;outRaster = "mosaic12"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rastOne=r"V:\Project\rast1"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rastTwo=r"C:\Project\subfolder\rast2"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;outRaster = "class7030"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.MosaicToNewRaster_management([rastOne;rastTwo], workspace, outRaster, "", "8_BIT_UNSIGNED", "2", "1", "FIRST", "FIRST")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-----------&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I use:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.MosaicToNewRaster_management("rastOne;rastTwo", workspace, outRaster, "", "8_BIT_UNSIGNED", "2", "1", "FIRST", "FIRST")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I get:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ERROR 000732: Input Rasters: Dataset rastOne;rastTwo does not exist or is not supported&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Jun 2014 23:18:10 GMT</pubDate>
    <dc:creator>DennisJongsomjit</dc:creator>
    <dc:date>2014-06-11T23:18:10Z</dc:date>
    <item>
      <title>mosaic to new raster - how to mosaic rasters in different directories</title>
      <link>https://community.esri.com/t5/python-questions/mosaic-to-new-raster-how-to-mosaic-rasters-in/m-p/742202#M57366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone help with figuring out how to list multiple rasters that are each saved in different folders for using within the mosaic to new raster tool?&amp;nbsp; Can't figure this out after much searching and testing.&amp;nbsp; I've tried putting the input rasters in brackets, in quotes,without quotes... I just keep getting an invalid syntax warning Failed to execute (MosaicToNewRaster)..&amp;nbsp; The example in the help file only lists one raster as the input raster and so I nominate it for worst help file - why would you want to mosaic a single raster?!?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-DJ&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;----------&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcgisscripting&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;gp = arcgisscripting.create(9.3)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;workspace = r"Z:\Climate"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.workspace = workspace&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;outRaster = "mosaic12"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rastOne=r"V:\Project\rast1"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rastTwo=r"C:\Project\subfolder\rast2"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;outRaster = "class7030"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.MosaicToNewRaster_management([rastOne;rastTwo], workspace, outRaster, "", "8_BIT_UNSIGNED", "2", "1", "FIRST", "FIRST")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-----------&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I use:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.MosaicToNewRaster_management("rastOne;rastTwo", workspace, outRaster, "", "8_BIT_UNSIGNED", "2", "1", "FIRST", "FIRST")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I get:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ERROR 000732: Input Rasters: Dataset rastOne;rastTwo does not exist or is not supported&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jun 2014 23:18:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/mosaic-to-new-raster-how-to-mosaic-rasters-in/m-p/742202#M57366</guid>
      <dc:creator>DennisJongsomjit</dc:creator>
      <dc:date>2014-06-11T23:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: mosaic to new raster - how to mosaic rasters in different directories</title>
      <link>https://community.esri.com/t5/python-questions/mosaic-to-new-raster-how-to-mosaic-rasters-in/m-p/742203#M57367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't know if 9.3 supports mosaic to new raster, but the &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//001700000098000000"&gt;help for 10.2&lt;/A&gt;&lt;SPAN&gt; uses two rasters as input. Anyway, since these rasters are coming from and going to a folder rather than a .gdb, they need the file extensions.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2014 15:29:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/mosaic-to-new-raster-how-to-mosaic-rasters-in/m-p/742203#M57367</guid>
      <dc:creator>Zeke</dc:creator>
      <dc:date>2014-06-12T15:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: mosaic to new raster - how to mosaic rasters in different directories</title>
      <link>https://community.esri.com/t5/python-questions/mosaic-to-new-raster-how-to-mosaic-rasters-in/m-p/742204#M57368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I don't know if 9.3 supports mosaic to new raster, but the &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//001700000098000000"&gt;help for 10.2&lt;/A&gt; uses two rasters as input. Anyway, since these rasters are coming from and going to a folder rather than a .gdb, they need the file extensions.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the reply.&amp;nbsp; 9.3 does have a mosaic to new raster tool but I wonder if the 10.2 version is all new.&amp;nbsp; So is it not possible then to save to a folder if you want to end up with ESRI grids?&amp;nbsp; The help says no extension for ESRI grids but also no extension if it's going into a .gdb....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll try out your suggestions and report back.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2014 17:13:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/mosaic-to-new-raster-how-to-mosaic-rasters-in/m-p/742204#M57368</guid>
      <dc:creator>DennisJongsomjit</dc:creator>
      <dc:date>2014-06-12T17:13:37Z</dc:date>
    </item>
    <item>
      <title>Re: mosaic to new raster - how to mosaic rasters in different directories</title>
      <link>https://community.esri.com/t5/python-questions/mosaic-to-new-raster-how-to-mosaic-rasters-in/m-p/742205#M57369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;&lt;BLOCKQUOTE&gt;DennisJongsomjit;395845 wrote:&lt;BR /&gt;Thanks for the reply.&amp;nbsp; 9.3 does have a mosaic to new raster tool but I wonder if the 10.2 version is all new.&amp;nbsp; So is it not possible then to save to a folder if you want to end up with ESRI grids?&amp;nbsp; The help says no extension for ESRI grids but also no extension if it's going into a .gdb..../QUOTE]&lt;/BLOCKQUOTE&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ESRI grids are always in a geodatabase. Regular folders need the file extension. As for whether the tool will work with 9.3, I don't know but arcpy was introduced at 10.0. Never used the older gp method, so can't say what works and what doesn't.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2014 17:29:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/mosaic-to-new-raster-how-to-mosaic-rasters-in/m-p/742205#M57369</guid>
      <dc:creator>Zeke</dc:creator>
      <dc:date>2014-06-12T17:29:25Z</dc:date>
    </item>
  </channel>
</rss>

