<?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: Set multiple output extent in python scripting. in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/set-multiple-output-extent-in-python-scripting/m-p/749554#M24575</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You would need to &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#/Describe/018v00000066000000/" rel="nofollow noopener noreferrer" target="_blank"&gt;describe &lt;/A&gt;&lt;SPAN&gt;the source feature class:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
desc = arcpy.Describe("pathToFeatureClass")
descExtent = desc.extent #returns an extent object
arcpy.env.extent = descExtent #extent object can be used to set &lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#/Output_Extent/001w00000009000000/" rel="nofollow noopener noreferrer" target="_blank"&gt;arcpy.env.extent&lt;/A&gt;
print arcpy.env.extent&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 07:51:06 GMT</pubDate>
    <dc:creator>LucasDanzinger</dc:creator>
    <dc:date>2021-12-12T07:51:06Z</dc:date>
    <item>
      <title>Set multiple output extent in python scripting.</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/set-multiple-output-extent-in-python-scripting/m-p/749551#M24572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi there,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I like to find out how you can set multiple extents within python scripts. For instance setting one extent for clipping analysis follow by setting a new output extent in another clipping analysis ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jun 2013 22:32:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/set-multiple-output-extent-in-python-scripting/m-p/749551#M24572</guid>
      <dc:creator>SamHuang</dc:creator>
      <dc:date>2013-06-21T22:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: Set multiple output extent in python scripting.</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/set-multiple-output-extent-in-python-scripting/m-p/749552#M24573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Not sure if this answers your question, but you can reset the arcpy.env.extent however many times you want throughout the script...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
from arcpy import env

env.extent = "-107.0 38.0 -104.0 40.0"
arcpy.Clip_analysis(r"C:\temp\indata",r"C:\temp\clipFeatures",r"C:\temp\outFeatures")

env.extent = "-108.0 39.0 -105.0 50.0"
arcpy.Clip_analysis(r"C:\temp\indata1",r"C:\temp\clipFeatures1",r"C:\temp\outFeatures1")&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:51:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/set-multiple-output-extent-in-python-scripting/m-p/749552#M24573</guid>
      <dc:creator>LucasDanzinger</dc:creator>
      <dc:date>2021-12-12T07:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: Set multiple output extent in python scripting.</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/set-multiple-output-extent-in-python-scripting/m-p/749553#M24574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hope anyone can also answer this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What if you want to set the environment syntax based on another file's extent ? How would the syntax look ? I've tried many different ways and it has&amp;nbsp; constantly given me an error as follow.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "iddea.py", line 71, in iddea&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pymsg = "PYTHON ERRORS:\nTraceback info:\n" + tbinfo + "\nError Info:\n" + str(sys.exc_info()[1])&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UnicodeEncodeError: 'ascii' codec can't encode characters in position 40-42: ordinal not in range(128)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks in advance&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jun 2013 15:38:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/set-multiple-output-extent-in-python-scripting/m-p/749553#M24574</guid>
      <dc:creator>SamHuang</dc:creator>
      <dc:date>2013-06-24T15:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: Set multiple output extent in python scripting.</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/set-multiple-output-extent-in-python-scripting/m-p/749554#M24575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You would need to &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#/Describe/018v00000066000000/" rel="nofollow noopener noreferrer" target="_blank"&gt;describe &lt;/A&gt;&lt;SPAN&gt;the source feature class:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
desc = arcpy.Describe("pathToFeatureClass")
descExtent = desc.extent #returns an extent object
arcpy.env.extent = descExtent #extent object can be used to set &lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#/Output_Extent/001w00000009000000/" rel="nofollow noopener noreferrer" target="_blank"&gt;arcpy.env.extent&lt;/A&gt;
print arcpy.env.extent&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:51:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/set-multiple-output-extent-in-python-scripting/m-p/749554#M24575</guid>
      <dc:creator>LucasDanzinger</dc:creator>
      <dc:date>2021-12-12T07:51:06Z</dc:date>
    </item>
  </channel>
</rss>

