<?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: Expand extent for purposes of clipping in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/expand-extent-for-purposes-of-clipping/m-p/34798#M2710</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suppose since you're expanding the extent by some number in all directions, you could just add/subtract that number to/from your original extent, rather than running a buffer process at all (I'm not sure if that's what Dan was getting at. If so, carry on).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Dec 2015 21:04:01 GMT</pubDate>
    <dc:creator>DarrenWiens2</dc:creator>
    <dc:date>2015-12-09T21:04:01Z</dc:date>
    <item>
      <title>Expand extent for purposes of clipping</title>
      <link>https://community.esri.com/t5/python-questions/expand-extent-for-purposes-of-clipping/m-p/34793#M2705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm wanting to clip a hydro layer (with a reselect) based on the extent of my study area extent....but expanded a bit (% to be determined). I have code that works, but it's a bit clunky. I grab the extent, create a poly, buffer, grab-new-extent, create the poly and then do my clip/query.&amp;nbsp; It's the getting the extent-&amp;gt;poly-&amp;gt;buffer-&amp;gt;extent-&amp;gt;poly that seems a bit overkill.&amp;nbsp; I'm wondering if I am missing an obvious arcpy option for expanding the extent for the clip.&amp;nbsp; Trying to keep it to arcpy and not get deep into the geometry of this one...but all suggestions will be considered.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
from arcpy import env
import os
arcpy.env.overwriteOutput = "True"

inStudy =&amp;nbsp; r'C:\Prep.gdb\study_boundary'
srDesc = arcpy.Describe(inStudy).spatialReference
extent = arcpy.Describe(inStudy).extent
arcpy.env.outputCoordinateSystem = srDesc.PCSCode

# ---&amp;gt; Ugly way to do this, but it works and fairly fast.&amp;nbsp; Ok for now.
# get extent, a buff distance (1% of X), and create a temp polygon
extBuffDist = ((int(abs(extent.lowerLeft.X - extent.lowerRight.X))) * .01)

# Array to hold points for the bounding box for initial extent
origExtentPts = arcpy.Array()
origExtentPts.add(extent.lowerLeft)
origExtentPts.add(extent.lowerRight)
origExtentPts.add(extent.upperRight)
origExtentPts.add(extent.upperLeft)
origExtentPts.add(extent.lowerLeft)&amp;nbsp; # ensures polygon closes
# Create and buffer the polygon object
polygonTmp1 = arcpy.Polygon(origExtentPts)
arcpy.Buffer_analysis(polygonTmp1, "polyBuff", extBuffDist, "OUTSIDE_ONLY")
origExtentPts.removeAll()

#get extent of buffered poly
extent = arcpy.Describe("polyBuff").extent
# Array to hold points for the buffer bounding box
newExtentPts = arcpy.Array()
newExtentPts.add(extent.lowerLeft)
newExtentPts.add(extent.lowerRight)
newExtentPts.add(extent.upperRight)
newExtentPts.add(extent.upperLeft)
newExtentPts.add(extent.lowerLeft) # ensures polygon closes
polygonTmp2 = arcpy.Polygon(newExtentPts)

# save to disk
#extentPoly = "extentPoly" 
arcpy.CopyFeatures_management(polygonTmp2, "extentPoly")
del polygonTmp1, polygonTmp2

hydroNHDSource = r"\\myServer\NHDH_AK.gdb\Hydrography\NHDFlowline"
hydroNHDQuery = "(GNIS_Name &amp;gt;= '1' AND ( FType = 566 OR FType = 460 OR FType = 558))"

arcpy.Clip_analysis(hydroNHDSource, "extentPoly", "hydroExtent")&amp;nbsp;&amp;nbsp; 
arcpy.MakeFeatureLayer_management("hydroExtent", "HydroReselect", hydroNHDQuery)
arcpy.Buffer_analysis("HydroReselect", "hydroBuff", 500, "FULL", "ROUND", "ALL" )
hydroBuffStudy = arcpy.Clip_analysis("hydroBuff", inStudy)
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:21:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/expand-extent-for-purposes-of-clipping/m-p/34793#M2705</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2021-12-10T21:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: Expand extent for purposes of clipping</title>
      <link>https://community.esri.com/t5/python-questions/expand-extent-for-purposes-of-clipping/m-p/34794#M2706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can make use of the buffer method of the &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#/Polygon/018z00000061000000/" rel="nofollow noopener noreferrer" target="_blank"&gt;polygon&lt;/A&gt; object to make a new buffered polygon geometry:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;polygonTmp1 = arcpy.Polygon(origExtentPts)&lt;/SPAN&gt;
&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;buffPoly = polygonTmp1.buffer(extBuffDist)&lt;/SPAN&gt;
&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;newExtent = buffPoly.extent # this returns an 'extent' object. May have to convert to 'polygon'&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:21:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/expand-extent-for-purposes-of-clipping/m-p/34794#M2706</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2021-12-10T21:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: Expand extent for purposes of clipping</title>
      <link>https://community.esri.com/t5/python-questions/expand-extent-for-purposes-of-clipping/m-p/34795#M2707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Darren, just grab the points from the extent to create the polygon, unfortunately, one would assume that they were a variant of a list but you have to go through the process Rebecca of getting them by name to create the polygon.&amp;nbsp; This hasn't even changed in Pro &lt;A href="http://pro.arcgis.com/en/pro-app/arcpy/classes/extent.htm" title="http://pro.arcgis.com/en/pro-app/arcpy/classes/extent.htm"&gt;Extent—ArcPy Classes | ArcGIS for Desktop&lt;/A&gt; but at least your buffer cuts out a step.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Dec 2015 20:09:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/expand-extent-for-purposes-of-clipping/m-p/34795#M2707</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-12-09T20:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: Expand extent for purposes of clipping</title>
      <link>https://community.esri.com/t5/python-questions/expand-extent-for-purposes-of-clipping/m-p/34796#M2708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Darren's answer was helpful, but as you mention Dan, I think I would still have to go thru the process of grabbing the LL, LR, etc corners into an array to make the poly.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ??&amp;nbsp;&amp;nbsp;&amp;nbsp; I guess it's the extent-&amp;gt;poly that I was hoping to simplify, i.e. without the array.&amp;nbsp; Maybe not possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a side note, the code Darren provided did allow me to remove two lines...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;arcpy.Buffer_analysis(polygonTmp1, "polyBuff", extBuffDist, "OUTSIDE_ONLY")
#...
extent = arcpy.Describe("polyBuff").extent
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:21:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/expand-extent-for-purposes-of-clipping/m-p/34796#M2708</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2021-12-10T21:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: Expand extent for purposes of clipping</title>
      <link>https://community.esri.com/t5/python-questions/expand-extent-for-purposes-of-clipping/m-p/34797#M2709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes you still have to get the values since they aren't variants of lists, but so you can't slice them but have to get them by name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;for row in arcpy.da.SearchCursor(in_FC, ["SHAPE@"]):
&amp;nbsp;&amp;nbsp;&amp;nbsp; extent = row[0].extent
&amp;nbsp;&amp;nbsp;&amp;nbsp; L,B,R,T = [extent.XMin, extent.YMin, extent.XMax, extent.YMax]
&amp;nbsp;&amp;nbsp;&amp;nbsp; frmt = "arcpy extent object {}\nScraped values for ... L {} B {} R {} T {}"
&amp;nbsp;&amp;nbsp;&amp;nbsp; print(frmt.format(extent, L, B, R, T))&lt;/PRE&gt;&lt;P&gt;but then at least you add/subtract from L,B,R,T to produce new extent objects and formulate a new point if you wanted to. or just use that after buffering the r[0] object above&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:21:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/expand-extent-for-purposes-of-clipping/m-p/34797#M2709</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-10T21:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: Expand extent for purposes of clipping</title>
      <link>https://community.esri.com/t5/python-questions/expand-extent-for-purposes-of-clipping/m-p/34798#M2710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suppose since you're expanding the extent by some number in all directions, you could just add/subtract that number to/from your original extent, rather than running a buffer process at all (I'm not sure if that's what Dan was getting at. If so, carry on).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Dec 2015 21:04:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/expand-extent-for-purposes-of-clipping/m-p/34798#M2710</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2015-12-09T21:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: Expand extent for purposes of clipping</title>
      <link>https://community.esri.com/t5/python-questions/expand-extent-for-purposes-of-clipping/m-p/34799#M2711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I took bits from both you and Dan and was able to get it to something that works (and give the same results, as I needed).&amp;nbsp; I didn't need a cursor as Dan pointed out (overkill for this project) but reassigning the extent.lowerLeft etc so shorter variables and then creating the array with a for loop worked for me. I wanted to use a buffer since that was the easiest/cleanest to move the extent out equal, in all directions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could use the output of the temp polygon object created from the extent of the buffer in my clip, so all works fine.&amp;nbsp; Final snippet of code..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
from arcpy import env
import os
arcpy.env.overwriteOutput = "True"

inStudy =&amp;nbsp; r'C:\Prep.gdb\study_boundary' # r"c:\temp\USA.gdb\States"
srDesc = arcpy.Describe(inStudy).spatialReference
arcpy.env.outputCoordinateSystem = srDesc.PCSCode

# get extent, a buff distance (1% of X), and create a temp polygon
extent = arcpy.Describe(inStudy).extent
ll, lr, ur, ul = [extent.lowerLeft, extent.lowerRight, extent.upperRight, extent.upperLeft]
extBuffDist = ((int(abs(ll.X - lr.X))) * .01)
origExtentPts = arcpy.Array()
# Array to hold points for the bounding box for initial extent
for coords in [ll, lr, ur, ul, ll]:
&amp;nbsp;&amp;nbsp;&amp;nbsp; origExtentPts.add(coords)

polygonTmp1 = arcpy.Polygon(origExtentPts)
# buffer the temporary poly by 1% of width of extent as caluculated above
buffPoly = polygonTmp1.buffer(extBuffDist)
newExtent = buffPoly.extent

# extent points for polygonTmp2
ll2, lr2, ur2, ul2 = [newExtent.lowerLeft, newExtent.lowerRight, newExtent.upperRight, newExtent.upperLeft]
newExtentPts = arcpy.Array()
for coords in [ll2, lr2, ur2, ul2, ll2]:
&amp;nbsp;&amp;nbsp;&amp;nbsp; newExtentPts.add(coords)

polygonTmp2 = arcpy.Polygon(newExtentPts)

hydroNHDSource = r"\\myServer\NHDH_AK.gdb\Hydrography\NHDFlowline"
hydroNHDQuery = "(GNIS_Name &amp;gt;= '1' AND ( FType = 566 OR FType = 460 OR FType = 558))"

arcpy.Clip_analysis(hydroNHDSource, polygonTmp2, "hydroExtent") 
arcpy.MakeFeatureLayer_management("hydroExtent", "HydroReselect", hydroNHDQuery)
arcpy.Buffer_analysis("HydroReselect", "hydroBuff", 500, "FULL", "ROUND", "ALL" )
hydroBuffStudy = arcpy.Clip_analysis("hydroBuff", inStudy)&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At least the array is easier to read.&amp;nbsp; So, I think Dan get's the correct answer for pointing out that I couldn't really get around the array for the coordinates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For anyone that cares, this is a part of a much larger project, but I needed to buffer a subset of the rivers within a study area, but since the NHD hydro in our area is still a bit fuzzy, and many of our study areas use the topo maps to create the boundaries (many times based on hydro), I needed to buffer the rivers before I clipped.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temporary layers..&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image" height="303" src="https://community.esri.com/legacyfs/online/154175_pastedImage_2.png" style="width: 356px; height: 302.6px;" width="356" /&gt; &lt;/P&gt;&lt;P&gt;and the final result (study area and buffers)&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-2 jive-image" height="283" src="https://community.esri.com/legacyfs/online/154176_pastedImage_3.png" style="width: 343px; height: 283.252px;" width="343" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Darren and Dan for you thoughts on this.&amp;nbsp; It helped a lot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:21:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/expand-extent-for-purposes-of-clipping/m-p/34799#M2711</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2021-12-10T21:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: Expand extent for purposes of clipping</title>
      <link>https://community.esri.com/t5/python-questions/expand-extent-for-purposes-of-clipping/m-p/34800#M2712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see you've got this figured out, but for this, why fight with the extents at all? Just buffer the study area, clip those streams in buffered area, buffer streams, clip back to study area. Perhaps it takes more time to buffer the study area than to clip a bunch of extra streams. Maybe it's six one way, half dozen the other, but I'd guess dealing with the fewest streams possible would be a good idea.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Dec 2015 21:50:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/expand-extent-for-purposes-of-clipping/m-p/34800#M2712</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2015-12-09T21:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: Expand extent for purposes of clipping</title>
      <link>https://community.esri.com/t5/python-questions/expand-extent-for-purposes-of-clipping/m-p/34801#M2713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ahh, yes good thoughts, and in many cases that would be better, but I'm using the same clip boundary for a bunch of other layers I'm clipping in the same script (topo maps, DEM, etc) that I want to be that same extent+, so this was just a piece of what I needed.&amp;nbsp; I just simplified the code to keep that part out, but worth noting for others.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Dec 2015 22:01:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/expand-extent-for-purposes-of-clipping/m-p/34801#M2713</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2015-12-09T22:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: Expand extent for purposes of clipping</title>
      <link>https://community.esri.com/t5/python-questions/expand-extent-for-purposes-of-clipping/m-p/34802#M2714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/2691" target="_blank"&gt;Rebecca Strauch, GISP&lt;/A&gt;​ alternate ways to get extent parameters to simplify code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; import numpy as np
&amp;gt;&amp;gt;&amp;gt; ext = extent.__str__()
&amp;gt;&amp;gt;&amp;gt; L, B, R, T, *ZZMM = np.fromstring(ext,dtype=float,sep= " ")
&amp;gt;&amp;gt;&amp;gt; l, b, r, t, *zzmm = [float(i) for i in ext.split(" ")]&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where lines 2 and 4 are the key lines are for pure python implementations and 2 and 3 are if numpy is used.... of course the letters represent their obvious values and *zzmm variants are the extra z, m min, max values if they are needed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:21:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/expand-extent-for-purposes-of-clipping/m-p/34802#M2714</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-10T21:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: Expand extent for purposes of clipping</title>
      <link>https://community.esri.com/t5/python-questions/expand-extent-for-purposes-of-clipping/m-p/34803#M2715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure if the OP stated whether this is for ArcGIS for Desktop or ArcGIS Pro.&amp;nbsp; Since extended iterable unpacking (&lt;A href="https://www.python.org/dev/peps/pep-3132/"&gt;PEP 3132&lt;/A&gt;) wasn't introduced until Python 3.0, neither lines 3 nor 4 will work with ArcGIS for Desktop since it is stuck with Python 2.x.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Dec 2015 19:14:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/expand-extent-for-purposes-of-clipping/m-p/34803#M2715</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2015-12-12T19:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: Expand extent for purposes of clipping</title>
      <link>https://community.esri.com/t5/python-questions/expand-extent-for-purposes-of-clipping/m-p/34804#M2716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Joshua, it is initially in a toolbox (so could be for either), but will be part of a python addin which aren't support by Pro.&amp;nbsp; I'm trying to keep it simple, and in arcpy as much possible.&amp;nbsp; Improved speed of numpy isn't necessary in this case, since this is a pretty minor part....the clipping is the main part.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Dec 2015 19:22:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/expand-extent-for-purposes-of-clipping/m-p/34804#M2716</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2015-12-12T19:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: Expand extent for purposes of clipping</title>
      <link>https://community.esri.com/t5/python-questions/expand-extent-for-purposes-of-clipping/m-p/34805#M2717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure what version of ArcGIS you are using, but starting at ArcGIS 10.3 the "&lt;A href="https://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-classes/extent.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Extent &lt;/A&gt;object now supports JSON and polygon properties."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; ext = arcpy.Describe(inStudy).extent
&amp;gt;&amp;gt;&amp;gt; new_ext_poly = ext.polygon.buffer(int((ext.XMax - ext.XMin)*0.01)).extent.polygon
&amp;gt;&amp;gt;&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you don't mind just a little rounding of the extent corners, you could drop &lt;SPAN style="font-family: courier new,courier;"&gt;.extent.polygon&lt;/SPAN&gt; from the end of line 2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:21:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/expand-extent-for-purposes-of-clipping/m-p/34805#M2717</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-10T21:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: Expand extent for purposes of clipping</title>
      <link>https://community.esri.com/t5/python-questions/expand-extent-for-purposes-of-clipping/m-p/34806#M2718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ooh yea.... you would have to expand the *zzmm term out in full... such a nice enhancement when you only need the first few and can't remember the rest...but it does save all that XMin...Xmax explicit calling stuff though.&amp;nbsp; This would be a an area that would be nice to see arcpy go...reflecting more generic objects than proprietary&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Dec 2015 00:17:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/expand-extent-for-purposes-of-clipping/m-p/34806#M2718</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-12-13T00:17:02Z</dc:date>
    </item>
    <item>
      <title>Re: Expand extent for purposes of clipping</title>
      <link>https://community.esri.com/t5/python-questions/expand-extent-for-purposes-of-clipping/m-p/34807#M2719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Extended iterable unpacking is a fantastic enhancement, I really wish it could have made its way backwards to 2.7.&amp;nbsp; Of course, Esri could help the situation by moving ArcGIS for Desktop to Python 3.x, but I am becoming suspicious that will never happen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am sure I have lamented about this before, but I think Esri really missed an opportunity with ArcGIS Pro to take ArcPy to the next level.&amp;nbsp; In some sense, that was done out of necessity with the ArcPy Mapping module (&lt;SPAN style="font-family: courier new,courier;"&gt;arcpy.mapping&lt;/SPAN&gt; =&amp;gt; &lt;SPAN style="font-family: courier new,courier;"&gt;arcpy.mp&lt;/SPAN&gt;)&amp;nbsp; because the interface is so different between Desktop and Pro, but the changes to all of the other modules and base package were minimal.&amp;nbsp; As has been brought up in GeoNet before, it would be great to see the ArcPy Geometry classes expanded and made much more Pythonic, wouldn't have the change to ArcGIS Pro been a great break in the product line to introduce such new functionality?&amp;nbsp; Oh well, c'est la vie in Esri-land.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Dec 2015 16:59:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/expand-extent-for-purposes-of-clipping/m-p/34807#M2719</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2015-12-13T16:59:01Z</dc:date>
    </item>
  </channel>
</rss>

