<?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: How do you use Clip_management in a python loop to clip rasters? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-do-you-use-clip-management-in-a-python-loop-to/m-p/259719#M19981</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This thread shows how you can loop through polygons and extract the raster by mask: &lt;A href="https://community.esri.com/message/392226" target="_blank"&gt;Re: Zonal statistics - percentiles&lt;/A&gt; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you loop through the polygons, each polygon has a extent property. This can be used in the Clip Management tool like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;ext = polygon.extent
rect = "{0} {1} {2} {3}".format(ext.XMin, ext.YMin, ext.XMax, ext.YMax)&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... and yes I would be a lot better if you would post the code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 12:47:02 GMT</pubDate>
    <dc:creator>XanderBakker</dc:creator>
    <dc:date>2021-12-11T12:47:02Z</dc:date>
    <item>
      <title>How do you use Clip_management in a python loop to clip rasters?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-you-use-clip-management-in-a-python-loop-to/m-p/259717#M19979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm trying to use Clip_management to clip 8 rasters to about 200 different polygon boundaries. I've got it in a python loop, but am stymied by the 'rectangle' part of the syntax for that tool. I can't hard-code that info as it changes for each polygon, I'm assuming.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I specify a rectangle extent that encompasses all of the polygons (generally in the state of Colorado)?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2015 21:54:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-you-use-clip-management-in-a-python-loop-to/m-p/259717#M19979</guid>
      <dc:creator>PamFroemke</dc:creator>
      <dc:date>2015-01-30T21:54:54Z</dc:date>
    </item>
    <item>
      <title>Re: How do you use Clip_management in a python loop to clip rasters?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-you-use-clip-management-in-a-python-loop-to/m-p/259718#M19980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is easier for fellow GeoNet community members to provide feedback if you post relevant, functional parts of your code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2015 23:12:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-you-use-clip-management-in-a-python-loop-to/m-p/259718#M19980</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2015-01-30T23:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: How do you use Clip_management in a python loop to clip rasters?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-you-use-clip-management-in-a-python-loop-to/m-p/259719#M19981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This thread shows how you can loop through polygons and extract the raster by mask: &lt;A href="https://community.esri.com/message/392226" target="_blank"&gt;Re: Zonal statistics - percentiles&lt;/A&gt; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you loop through the polygons, each polygon has a extent property. This can be used in the Clip Management tool like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;ext = polygon.extent
rect = "{0} {1} {2} {3}".format(ext.XMin, ext.YMin, ext.XMax, ext.YMax)&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... and yes I would be a lot better if you would post the code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:47:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-you-use-clip-management-in-a-python-loop-to/m-p/259719#M19981</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-12-11T12:47:02Z</dc:date>
    </item>
  </channel>
</rss>

