<?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: Iterate Raster Collect Values Sub-Model Batch process question. in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/iterate-raster-collect-values-sub-model-batch/m-p/140546#M4759</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It does exhibit some strange behaviour. I'm using the modelbuilder to automate (as per example given, using &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;iterate rasters &lt;/SPAN&gt;&lt;SPAN&gt;then &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;collect values&lt;/SPAN&gt;&lt;SPAN&gt; to gather rasters) and on iterating through a folder containing rasters, it passes each one in turn, then reiterates, rather than iterating through the lot then passing the whole collection to the mosaic function. eg:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;rast1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mosaic&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;rast1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rast2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mosaic&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;rast1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rast2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rast3&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mosaic&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;rast1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rast2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rast3&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rast4&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rast5&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rastN&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mosaic&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now as i'm using the max operator, this does not affect output, simply makes the process incredibly slow. Especially when i have &amp;gt;100 rasters in each folder! I've checked output (against a manual mosaic) and it is including all the rasters, not missing any as some other people on other threads have found. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have lots of folders so the point was to automate going through the set of folders, each containing many rasters. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to batch the model and rather than mosaicing each set from each folder to a separate output, it mosaics them all together, rather than keeping each run of the model separate. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to nest the model inside another model which iterated the folders containing each set of rasters and it fails (number of bands must match error) despite the child model working fine on it's own. The only thing being passed in being the input folder containing each set of rasters. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Am now doing each workspace individually. Thankfully not too many but still painful, especially having lost time to trying to get models to work...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Oct 2011 14:59:07 GMT</pubDate>
    <dc:creator>paulcripps</dc:creator>
    <dc:date>2011-10-13T14:59:07Z</dc:date>
    <item>
      <title>Iterate Raster Collect Values Sub-Model Batch process question.</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/iterate-raster-collect-values-sub-model-batch/m-p/140545#M4758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Using the desktop help ("Examples of using Model Only tools in ModelBuilder"), I replicated the model example that was provided for Collect Values. It iterates through rasters in a workspace, collects the values, then passes those values to the Mosaic to New Raster tool. This works fine when I provide one workspace but if I try to batch process multiple workspaces (I've got thousands of them) the resulting mosaic output is wrong.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What seems to happen is it only collects the first raster in the first workspace provided, then it moves to the next workspace, iterates / collects all of those rasters, then passes all this to the Mosaic to New Raster tool. The output is a mosaic raster containing inputs from multiple workspaces. This is wrong in two ways: 1) Each workspace needs to be operated on separately and 2) not all rasters are being collected in the iteration process.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So am I missing something here? Is it even possible to batch process a model iteration? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance for any input provided.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dave&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jan 2011 16:43:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/iterate-raster-collect-values-sub-model-batch/m-p/140545#M4758</guid>
      <dc:creator>DavidQuillin</dc:creator>
      <dc:date>2011-01-07T16:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate Raster Collect Values Sub-Model Batch process question.</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/iterate-raster-collect-values-sub-model-batch/m-p/140546#M4759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It does exhibit some strange behaviour. I'm using the modelbuilder to automate (as per example given, using &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;iterate rasters &lt;/SPAN&gt;&lt;SPAN&gt;then &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;collect values&lt;/SPAN&gt;&lt;SPAN&gt; to gather rasters) and on iterating through a folder containing rasters, it passes each one in turn, then reiterates, rather than iterating through the lot then passing the whole collection to the mosaic function. eg:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;rast1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mosaic&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;rast1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rast2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mosaic&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;rast1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rast2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rast3&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mosaic&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;rast1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rast2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rast3&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rast4&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rast5&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rastN&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mosaic&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now as i'm using the max operator, this does not affect output, simply makes the process incredibly slow. Especially when i have &amp;gt;100 rasters in each folder! I've checked output (against a manual mosaic) and it is including all the rasters, not missing any as some other people on other threads have found. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have lots of folders so the point was to automate going through the set of folders, each containing many rasters. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to batch the model and rather than mosaicing each set from each folder to a separate output, it mosaics them all together, rather than keeping each run of the model separate. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to nest the model inside another model which iterated the folders containing each set of rasters and it fails (number of bands must match error) despite the child model working fine on it's own. The only thing being passed in being the input folder containing each set of rasters. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Am now doing each workspace individually. Thankfully not too many but still painful, especially having lost time to trying to get models to work...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Oct 2011 14:59:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/iterate-raster-collect-values-sub-model-batch/m-p/140546#M4759</guid>
      <dc:creator>paulcripps</dc:creator>
      <dc:date>2011-10-13T14:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate Raster Collect Values Sub-Model Batch process question.</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/iterate-raster-collect-values-sub-model-batch/m-p/140547#M4760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Paul_c,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It is always recommended that you should not mix bath and iteration together as both have different ways of execution. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Meanwhile share a snapshot of your models and the data structure you are using. It might help in suggesting a solution. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, check this &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/40100-Issua-batching-a-model-built-in-quot-model-builder-quot?highlight=shitijmehta"&gt;post&lt;/A&gt;&lt;SPAN&gt; to understand nested models a bit more and look at the image attached to the entry on 09-26-2011 02:07 PM. May be this helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To iterate through all the folders put all the folders in one main root folder and check the recursive option in the iterate raster iterator.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For the Mosaic to Raster tool the &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001700000098000000"&gt;help&lt;/A&gt;&lt;SPAN&gt; says "The inputs must have the same number of bands and same bit depth; otherwise, the tool will exit with an error message."&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Oct 2011 15:28:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/iterate-raster-collect-values-sub-model-batch/m-p/140547#M4760</guid>
      <dc:creator>ShitijMehta</dc:creator>
      <dc:date>2011-10-13T15:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate Raster Collect Values Sub-Model Batch process question.</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/iterate-raster-collect-values-sub-model-batch/m-p/140548#M4761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks very much for this comment. It help me to think about my ideals.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tks again and pls keep posting.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2012 08:42:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/iterate-raster-collect-values-sub-model-batch/m-p/140548#M4761</guid>
      <dc:creator>tuango</dc:creator>
      <dc:date>2012-03-15T08:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate Raster Collect Values Sub-Model Batch process question.</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/iterate-raster-collect-values-sub-model-batch/m-p/140549#M4762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for your link. It's useful for our community.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Same material can be found at : &lt;/SPAN&gt;&lt;A href="http://www.humanresources.hrvinet.com/mosaic-model/"&gt;MOSAIC model&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope it's useful for you and you like it. Please continue sharing more information at this topic.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Best rgs!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Mar 2012 12:46:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/iterate-raster-collect-values-sub-model-batch/m-p/140549#M4762</guid>
      <dc:creator>tuango</dc:creator>
      <dc:date>2012-03-24T12:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate Raster Collect Values Sub-Model Batch process question.</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/iterate-raster-collect-values-sub-model-batch/m-p/140550#M4763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, I am having a similar problem with combining an iterator and the collect values tool with the Mosaic to New Raster tool. Basically I would like to collect a number of rasters from a geodatabase based on a Wildcard specification, then mosaic these into a new raster. However, I continue to get the ERROR 00157 "Input and target dataset should have the same number of bands". I'm not sure what the problem is. All the rasters have a single band and I am following almost the exact same process as ESRI's &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00400000001m000000.htm"&gt;example &lt;/A&gt;&lt;SPAN&gt;of how to use the Collect Values tool. I have also attached an image of what my model looks like.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for the help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2012 22:02:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/iterate-raster-collect-values-sub-model-batch/m-p/140550#M4763</guid>
      <dc:creator>ZackSteel</dc:creator>
      <dc:date>2012-07-03T22:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate Raster Collect Values Sub-Model Batch process question.</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/iterate-raster-collect-values-sub-model-batch/m-p/140551#M4764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Zack, this may or may not work, but one thing I have been learning about Collect Values is that it runs best when run in a sub-model, and the "collected" values are passed back into a main model all at once.&amp;nbsp; Otherwise, one experiences what paul_c describes, where the Mosaic tool runs after each iteration.&amp;nbsp; One of ESRI's examples seems to indicate it will iterate through all rasters and collect all values prior to going on to the next tool, but this is not the case in my experience.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't know if this will solve the number of bands issue, but it might.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dave&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi, I am having a similar problem with combining an iterator and the collect values tool with the Mosaic to New Raster tool. Basically I would like to collect a number of rasters from a geodatabase based on a Wildcard specification, then mosaic these into a new raster. However, I continue to get the ERROR 00157 "Input and target dataset should have the same number of bands". I'm not sure what the problem is. All the rasters have a single band and I am following almost the exact same process as ESRI's &lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00400000001m000000.htm"&gt;example &lt;/A&gt;of how to use the Collect Values tool. I have also attached an image of what my model looks like.&lt;BR /&gt;Thank you for the help.&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2012 23:26:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/iterate-raster-collect-values-sub-model-batch/m-p/140551#M4764</guid>
      <dc:creator>DavidHockman-Wert</dc:creator>
      <dc:date>2012-07-11T23:26:42Z</dc:date>
    </item>
  </channel>
</rss>

