<?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: Iterating extract by mask in ArcPy for 73 different masks and 21 different input rasters that don't all interconnect in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/iterating-extract-by-mask-in-arcpy-for-73/m-p/1280849#M68172</link>
    <description>&lt;P&gt;Think you have to set your Workspace for ListRasters().&amp;nbsp; At the moment it's probably returning nothing.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 20 Apr 2023 16:21:35 GMT</pubDate>
    <dc:creator>DavidPike</dc:creator>
    <dc:date>2023-04-20T16:21:35Z</dc:date>
    <item>
      <title>Iterating extract by mask in ArcPy for 73 different masks and 21 different input rasters that don't all interconnect</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/iterating-extract-by-mask-in-arcpy-for-73/m-p/1280570#M68156</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am using ArcGIS Pro 10.8.1 on a PC. I am struggling to be able to extract 21 .tif raster files that need to be extracted using 73 different .tif raster masks, making for quite a few output .tif files all with unique names.&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;I would like the name the output files in the following way: mask_name_input_name. Not all of the input rasters cross all the mask rasters, and so I think a for loop needs to be in the code somewhere, I'm just not sure where. I can email anyone who wants the exact files.&lt;BR /&gt;I think part of the issue for me is that I'm not sure how the os.path.join works in conjunction with the ListRaster function. Do I need to specify something in either of those?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not all input rasters cross the mask rasters, which makes it slightly different (I think?) from this example from this community page: &lt;A href="https://community.esri.com/t5/arcgis-pro-questions/possible-to-iterate-both-input-raster-and-mask-in/m-p/1070217#M42215" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-pro-questions/possible-to-iterate-both-input-raster-and-mask-in/m-p/1070217#M42215&lt;/A&gt; that I tried but kept coming up with this error:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;TypeError&lt;/SPAN&gt;                                 Traceback (most recent call last)
In  &lt;SPAN class=""&gt;[14]&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;12&lt;/SPAN&gt;:    in_rasters = [os.path.join(inras_ws, raster) &lt;SPAN class=""&gt;for&lt;/SPAN&gt; raster &lt;SPAN class=""&gt;in&lt;/SPAN&gt; arcpy.ListRasters()]

&lt;SPAN class=""&gt;TypeError&lt;/SPAN&gt;: 'NoneType' object is not iterable
&lt;SPAN class=""&gt;---------------------------------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class=""&gt;Thank-you in advance!&lt;BR /&gt;Mara&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2023 23:39:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/iterating-extract-by-mask-in-arcpy-for-73/m-p/1280570#M68156</guid>
      <dc:creator>MaraNutt</dc:creator>
      <dc:date>2023-04-19T23:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: Iterating extract by mask in ArcPy for 73 different masks and 21 different input rasters that don't all interconnect</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/iterating-extract-by-mask-in-arcpy-for-73/m-p/1280849#M68172</link>
      <description>&lt;P&gt;Think you have to set your Workspace for ListRasters().&amp;nbsp; At the moment it's probably returning nothing.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 16:21:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/iterating-extract-by-mask-in-arcpy-for-73/m-p/1280849#M68172</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2023-04-20T16:21:35Z</dc:date>
    </item>
  </channel>
</rss>

