<?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: Batch Clip with Multiple Inputs in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/batch-clip-with-multiple-inputs/m-p/624927#M20706</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Mel,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rather than using the Clip Raster is Batch mode, have you considered creating a model to iterate through your rasters and clip them?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For a better explanation on ModelBuilder and Iterators see &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//00400000001n000000"&gt;this page&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Chris B.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Dec 2013 19:24:17 GMT</pubDate>
    <dc:creator>ChristopherBlinn1</dc:creator>
    <dc:date>2013-12-12T19:24:17Z</dc:date>
    <item>
      <title>Batch Clip with Multiple Inputs</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/batch-clip-with-multiple-inputs/m-p/624926#M20705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to run a batch clip for 60+ rasters and am looking for a way to incorporate a text/csv file with the location of the inputs and clip features. Is there a way to run the batch clip with out adding each item line by line? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help is appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2013 19:21:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/batch-clip-with-multiple-inputs/m-p/624926#M20705</guid>
      <dc:creator>MelissaSlater</dc:creator>
      <dc:date>2013-12-12T19:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Clip with Multiple Inputs</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/batch-clip-with-multiple-inputs/m-p/624927#M20706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Mel,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rather than using the Clip Raster is Batch mode, have you considered creating a model to iterate through your rasters and clip them?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For a better explanation on ModelBuilder and Iterators see &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//00400000001n000000"&gt;this page&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Chris B.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2013 19:24:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/batch-clip-with-multiple-inputs/m-p/624927#M20706</guid>
      <dc:creator>ChristopherBlinn1</dc:creator>
      <dc:date>2013-12-12T19:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Clip with Multiple Inputs</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/batch-clip-with-multiple-inputs/m-p/624928#M20707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Chris, Thanks. I had looked at iterators but had read that I can only use 1 iterator per model. I am not sure how to iterate the raster dataset and call the extent polygon clip features in the same model with 1 iterator. Each raster and clip poly have a 1 to 1 relationship.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any other suggestions?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2013 20:07:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/batch-clip-with-multiple-inputs/m-p/624928#M20707</guid>
      <dc:creator>MelissaSlater</dc:creator>
      <dc:date>2013-12-12T20:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Clip with Multiple Inputs</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/batch-clip-with-multiple-inputs/m-p/624929#M20708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Mel,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just so I understand everything correctly, and I should have asked this first but:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;OL&gt;&lt;BR /&gt;&lt;LI&gt;Are you clipping each raster with the same extent polygon?&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Are all of the rasters in the same folder, or geodatabase?&lt;/LI&gt;&lt;BR /&gt;&lt;/OL&gt;&lt;BR /&gt;&lt;SPAN&gt;If the answer is yes to both of these, then I can walk you through setting up a very easy to use model.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just let me know.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Chris B.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2013 20:18:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/batch-clip-with-multiple-inputs/m-p/624929#M20708</guid>
      <dc:creator>ChristopherBlinn1</dc:creator>
      <dc:date>2013-12-12T20:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Clip with Multiple Inputs</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/batch-clip-with-multiple-inputs/m-p/624930#M20709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Chris,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Each raster has a unique polygon clip feature but yes, they are all in a single file/workspace.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And I need to retain each individual projection (hence I am not able to merge polys into a single dataset).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-Mel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2013 20:23:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/batch-clip-with-multiple-inputs/m-p/624930#M20709</guid>
      <dc:creator>MelissaSlater</dc:creator>
      <dc:date>2013-12-12T20:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Clip with Multiple Inputs</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/batch-clip-with-multiple-inputs/m-p/624931#M20710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Mel,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Embedding iterators is possible but not a very easy process, considering some of the naming conventions and parameter assignments that need to be made.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Inline variable substitution could be used if you happen to have rasters with similar names as the polygon clipping extents.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example, if Raster_1 needs to be clipped by Extent_1, then only one iterator is necessary and a simple model using the inline variable identifying each raster and extent could be used.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Your CSV idea would work if you used python to read the CSV:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
import arcpy
import csv

csvfile&amp;nbsp; = open('test.csv', "rb")
reader = csv.reader(csvfile)

i = 1
for row in reader:
&amp;nbsp;&amp;nbsp;&amp;nbsp; text = row&lt;I&gt;.split(",")
&amp;nbsp;&amp;nbsp;&amp;nbsp; inraster = text[0]
&amp;nbsp;&amp;nbsp;&amp;nbsp; extent = text[1]
&amp;nbsp;&amp;nbsp;&amp;nbsp; outraster = text[2]
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Clip_management(inraster, extent, outraster, "", "", "NONE")

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i += 1

&lt;/I&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is not tested, but simply put, it reads a csv file (second row since first row is probably headers), and splits the row at the commas.&amp;nbsp; The first value of the row is the input raster, second is the polygon extent feature class, the third is the output raster location and name.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hopefully this gets you going in the right direction.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Chris B.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:37:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/batch-clip-with-multiple-inputs/m-p/624931#M20710</guid>
      <dc:creator>ChristopherBlinn1</dc:creator>
      <dc:date>2021-12-12T02:37:38Z</dc:date>
    </item>
  </channel>
</rss>

