<?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: Mosaic a list of grids fails arcpy - Solved in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/mosaic-a-list-of-grids-fails-arcpy-solved/m-p/305979#M23730</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, I managed to solve the issue. My problem was the "separator". I was using " ; " instead of " , " thus the input was being interpreted as one single file. Thanks Dan by the way.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Oct 2014 10:41:53 GMT</pubDate>
    <dc:creator>RafaelAnleu</dc:creator>
    <dc:date>2014-10-21T10:41:53Z</dc:date>
    <item>
      <title>Mosaic a list of grids fails arcpy - Solved</title>
      <link>https://community.esri.com/t5/python-questions/mosaic-a-list-of-grids-fails-arcpy-solved/m-p/305975#M23726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I am trying to mosaic a list of grids with arcpy.MosaicToNewRaster_management but keep getting a series of errors, no matter what I try. My problem seems to lie on the input rasters. Since I need to mosaic a series of grids, then the input becomes a multi value input, thus I have tried the three ways suggested by &lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//002z00000013000000" title="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//002z00000013000000"&gt;ArcGIS Desktop&lt;/A&gt; . Yes I am working with ArcGis 10.0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;So, first thing with Python List:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ERROR 000157: Input and target dataset should have the same number of bands&lt;/P&gt;&lt;P&gt;Whith following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dem_list = ["path1\\grid1;path2\\grid2"]&lt;/P&gt;&lt;P&gt;arcpy.MosaicToNewRaster_management(dem_list, target_gdb, "mos_wat", varGeo_SpatRef, "32_BIT_FLOAT", "", "1", "MEAN", "REJECT")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Now, with Value Table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ERROR 000732: Input Rasters: Dataset F:\FLOODS_USA\A_FLOODS\DEM_SRTM\ADEM_10mUSA_Neue\n25w081\grdn25w081_13;F:\FLOODS_USA\A_FLOODS\DEM_SRTM\ADEM_10mUSA_Neue\n25w081\grdn25w082_13 does not exist or is not supported&lt;/P&gt;&lt;P&gt;Whith following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dem1 = "path1\\grid1"&lt;/P&gt;&lt;P&gt;dem2 = "path2\\grid2"&lt;/P&gt;&lt;P&gt;vt = arcpy.ValueTable(1)&lt;/P&gt;&lt;P&gt;vt.addRow(dem1)&lt;/P&gt;&lt;P&gt;vt.addRow(dem2)&lt;/P&gt;&lt;P&gt;arcpy.MosaicToNewRaster_management(vt, a_gdb, "mos_wat", varGeo_SpatRef, "32_BIT_FLOAT", "", "1", "MEAN", "REJECT")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Finally with String&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ERROR 000157: Input and target dataset should have the same number of bands&lt;/P&gt;&lt;P&gt;Whith following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dem_list = "path1\\grid1;path2\\grid2"&lt;/P&gt;&lt;P&gt;arcpy.MosaicToNewRaster_management(dem_list, target_gdb, "mos_wat", varGeo_SpatRef, "32_BIT_FLOAT", "", "1", "MEAN", "REJECT")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For all three cases, if I print the input variable it seems to be in the correct format as bellow&lt;/P&gt;&lt;P&gt;path1\grid1;path2\grid2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have also tried wraping it in quotes as to have&lt;/P&gt;&lt;P&gt;"path1\grid1;path2\grid2"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I get the same problem. I have of course searched for answers here and somewhere else, and I find no definitive answer to it, since everything points to what I have already tried without success. I would appreciate any help here. By the way: paths, bands, type and projection are all OK.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Oct 2014 15:00:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/mosaic-a-list-of-grids-fails-arcpy-solved/m-p/305975#M23726</guid>
      <dc:creator>RafaelAnleu</dc:creator>
      <dc:date>2014-10-20T15:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: Mosaic a list of grids fails arcpy</title>
      <link>https://community.esri.com/t5/python-questions/mosaic-a-list-of-grids-fails-arcpy-solved/m-p/305976#M23727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And you are emulating the &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//001700000098000000"&gt;script in the help topic &lt;/A&gt;exactly?n&amp;nbsp; I would recommend doing it manually, then get to the Results window and check the syntax there which you can use as part of your python script as a code snippet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Oct 2014 17:34:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/mosaic-a-list-of-grids-fails-arcpy-solved/m-p/305976#M23727</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2014-10-20T17:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: Mosaic a list of grids fails arcpy</title>
      <link>https://community.esri.com/t5/python-questions/mosaic-a-list-of-grids-fails-arcpy-solved/m-p/305977#M23728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I actually started with a Model on Model Builder (as I usually do), after it worked I exported to Python and begann to edit it. It came out as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.MosaicToNewRaster_management("full_path1\\grid1;full_path2\\grid2", target_dir.... )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when I make a print out of any of my three options, it comes out as the input above, unless there is some hidden character which I doubt, and that is what is most mind boggling.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 07:12:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/mosaic-a-list-of-grids-fails-arcpy-solved/m-p/305977#M23728</guid>
      <dc:creator>RafaelAnleu</dc:creator>
      <dc:date>2014-10-21T07:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: Mosaic a list of grids fails arcpy</title>
      <link>https://community.esri.com/t5/python-questions/mosaic-a-list-of-grids-fails-arcpy-solved/m-p/305978#M23729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;do it in ArcToolbox setting your Environments within the option at the bottom of the tool itself, then go to the Results window.&amp;nbsp; If it works in Arctoolbox, then there may be Environment options that aren't getting carried over in the translation to a script&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 07:44:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/mosaic-a-list-of-grids-fails-arcpy-solved/m-p/305978#M23729</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2014-10-21T07:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: Mosaic a list of grids fails arcpy - Solved</title>
      <link>https://community.esri.com/t5/python-questions/mosaic-a-list-of-grids-fails-arcpy-solved/m-p/305979#M23730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, I managed to solve the issue. My problem was the "separator". I was using " ; " instead of " , " thus the input was being interpreted as one single file. Thanks Dan by the way.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 10:41:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/mosaic-a-list-of-grids-fails-arcpy-solved/m-p/305979#M23730</guid>
      <dc:creator>RafaelAnleu</dc:creator>
      <dc:date>2014-10-21T10:41:53Z</dc:date>
    </item>
  </channel>
</rss>

