<?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 Create polygon / fc from map extent in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/create-polygon-fc-from-map-extent/m-p/140974#M10962</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hallo,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;there are several topics on different forums concerning this matter, but&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I haven't found a hint how to this in ArcGIS 10.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you have an idea or a code snippet?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanx,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Matthias&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Nov 2011 16:22:47 GMT</pubDate>
    <dc:creator>MatthiasAbele</dc:creator>
    <dc:date>2011-11-21T16:22:47Z</dc:date>
    <item>
      <title>Create polygon / fc from map extent</title>
      <link>https://community.esri.com/t5/python-questions/create-polygon-fc-from-map-extent/m-p/140974#M10962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hallo,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;there are several topics on different forums concerning this matter, but&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I haven't found a hint how to this in ArcGIS 10.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you have an idea or a code snippet?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanx,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Matthias&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2011 16:22:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-polygon-fc-from-map-extent/m-p/140974#M10962</guid>
      <dc:creator>MatthiasAbele</dc:creator>
      <dc:date>2011-11-21T16:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: Create polygon / fc from map extent</title>
      <link>https://community.esri.com/t5/python-questions/create-polygon-fc-from-map-extent/m-p/140975#M10963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Matthias,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is a code sample.&amp;nbsp; The code grabs the extent from an MXDs data frame, creates an array, and then converts the array to a polygon feature class.&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
from arcpy import mapping

env.workspace = r"C:\temp\Test.gdb"

mxd = mapping.MapDocument(r"C:\temp\python\Philadelphia.mxd")
dataframe = mapping.ListDataFrames(mxd, "*")[0]
frameExtent = dataframe.extent
XMAX = frameExtent.XMax
XMIN = frameExtent.XMin
YMAX = frameExtent.YMax
YMIN = frameExtent.YMin
pnt1 = arcpy.Point(XMIN, YMIN)
pnt2 = arcpy.Point(XMIN, YMAX)
pnt3 = arcpy.Point(XMAX, YMAX)
pnt4 = arcpy.Point(XMAX, YMIN)
array = arcpy.Array()
array.add(pnt1)
array.add(pnt2)
array.add(pnt3)
array.add(pnt4)
array.add(pnt1)
polygon = arcpy.Polygon(array)
arcpy.CopyFeatures_management(polygon, "Polygon_Extent")&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:46:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-polygon-fc-from-map-extent/m-p/140975#M10963</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2021-12-11T07:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: Create polygon / fc from map extent</title>
      <link>https://community.esri.com/t5/python-questions/create-polygon-fc-from-map-extent/m-p/140976#M10964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hallo JSkinn3,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thany, the code works perfectly. Is it possible to loop through a folder, which contains several&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mxds and store all polygons in one fc?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yours,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Matthias&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Nov 2011 08:37:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-polygon-fc-from-map-extent/m-p/140976#M10964</guid>
      <dc:creator>MatthiasAbele</dc:creator>
      <dc:date>2011-11-22T08:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: Create polygon / fc from map extent</title>
      <link>https://community.esri.com/t5/python-questions/create-polygon-fc-from-map-extent/m-p/140977#M10965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Take a look at this &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/28639-Automating-capture-of-Extent-from-multiple-mxds-with-multiple-dataframes?highlight=array"&gt;thread&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Nov 2011 14:09:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-polygon-fc-from-map-extent/m-p/140977#M10965</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2011-11-23T14:09:10Z</dc:date>
    </item>
    <item>
      <title>Re: Create polygon / fc from map extent</title>
      <link>https://community.esri.com/t5/python-questions/create-polygon-fc-from-map-extent/m-p/140978#M10966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have been looking for something like this for a little while now and the Python script that was posted here a few years back worked great.&amp;nbsp; Thnaks for that!&amp;nbsp; However, would it be possible to run something like this on multiple pages?&amp;nbsp; I used Data Driven Pages to create several pages and would like a feature class or shapefile of the map extent of all of these pages.&amp;nbsp; I noticed that this script will only output the first page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance and I appreciate the assistance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 16:10:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-polygon-fc-from-map-extent/m-p/140978#M10966</guid>
      <dc:creator>CraigPrisland1</dc:creator>
      <dc:date>2015-09-10T16:10:08Z</dc:date>
    </item>
    <item>
      <title>Re: Create polygon / fc from map extent</title>
      <link>https://community.esri.com/t5/python-questions/create-polygon-fc-from-map-extent/m-p/140979#M10967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="background-color: inherit; color: black; font-weight: inherit; font-size: 9pt !important; font-style: inherit;"&gt;You can modify &lt;A href="https://community.esri.com/migrated-users/8586" target="_blank"&gt;Jake Skinner&lt;/A&gt;​'s code as below to accommodate DDPs (mostly tested):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="background-color: inherit; color: black; font-weight: inherit; font-size: 9pt !important; font-style: inherit;"&gt;import arcpy&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;from arcpy import env&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;from arcpy import mapping&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;env.workspace = r"C:\temp\Test.gdb"&amp;nbsp; &lt;/SPAN&gt;

&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;extents = []&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;mxd = mapping.MapDocument(r"C:\temp\python\Philadelphia.mxd")&amp;nbsp; &lt;/SPAN&gt;
for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mxd.dataDrivenPages.currentPageID = pageNum
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataframe = mapping.ListDataFrames(mxd, "*")[0]&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; frameExtent = dataframe.extent&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XMAX = frameExtent.XMax&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XMIN = frameExtent.XMin&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; YMAX = frameExtent.YMax&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; YMIN = frameExtent.YMin&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pnt1 = arcpy.Point(XMIN, YMIN)&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pnt2 = arcpy.Point(XMIN, YMAX)&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pnt3 = arcpy.Point(XMAX, YMAX)&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pnt4 = arcpy.Point(XMAX, YMIN)&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array = arcpy.Array()&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array.add(pnt1)&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array.add(pnt2)&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array.add(pnt3)&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array.add(pnt4)&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array.add(pnt1)&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; polygon = arcpy.Polygon(array) &lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; extents.append(polygon)&lt;/SPAN&gt;

&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;arcpy.CopyFeatures_management(extents, "Polygon_Extent") &lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:46:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-polygon-fc-from-map-extent/m-p/140979#M10967</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2021-12-11T07:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: Create polygon / fc from map extent</title>
      <link>https://community.esri.com/t5/python-questions/create-polygon-fc-from-map-extent/m-p/140980#M10968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Darren,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is exactly what I was looking for.&amp;nbsp; Thank you very much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 17:17:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-polygon-fc-from-map-extent/m-p/140980#M10968</guid>
      <dc:creator>CraigPrisland1</dc:creator>
      <dc:date>2015-09-10T17:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: Create polygon / fc from map extent</title>
      <link>https://community.esri.com/t5/python-questions/create-polygon-fc-from-map-extent/m-p/140981#M10969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Darren,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;This code you modified worked well.&amp;nbsp; I did have one other question if possible.&amp;nbsp; The "Polygon_Extent" layer that gets outputted does not contain any fields.&amp;nbsp; Is it possible to incorporate the field that was used to create the Data Driven Pages from (i.e. the index layer) into the outputted layer?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Thanks again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Oct 2015 17:02:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-polygon-fc-from-map-extent/m-p/140981#M10969</guid>
      <dc:creator>CraigPrisland1</dc:creator>
      <dc:date>2015-10-07T17:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: Create polygon / fc from map extent</title>
      <link>https://community.esri.com/t5/python-questions/create-polygon-fc-from-map-extent/m-p/140982#M10970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As far as I know, you have to do a fair bit of recoding to incorporate attributes into this type of snippet. It can be done by creating a new feature class and adding the field before the loop, then adding features to the feature class inside the loop using an &lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#/InsertCursor/018w0000000t000000/" rel="nofollow noopener noreferrer" target="_blank"&gt;InsertCursor&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If someone know if it's possible to include attributes somehow using CopyFeatures, I would be eternally grateful. Something like this would be ideal, although I don't believe it's possible:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp; extents.append([polygon, field1, field2, etc.])
&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-color: #f6f6f6;"&gt;arcpy.CopyFeatures_management(extents, &lt;/SPAN&gt;&lt;SPAN class="string" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: blue; background-color: #f6f6f6;"&gt;"Polygon_Extent"&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f6f6f6;"&gt;) &lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f6f6f6;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:46:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-polygon-fc-from-map-extent/m-p/140982#M10970</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2021-12-11T07:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: Create polygon / fc from map extent</title>
      <link>https://community.esri.com/t5/python-questions/create-polygon-fc-from-map-extent/m-p/140983#M10971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could use &lt;A href="http://desktop.arcgis.com/en/desktop/latest/tools/analysis-toolbox/spatial-join.htm" title="http://desktop.arcgis.com/en/desktop/latest/tools/analysis-toolbox/spatial-join.htm"&gt;Spatial Join—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Oct 2015 20:08:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-polygon-fc-from-map-extent/m-p/140983#M10971</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2015-10-07T20:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: Create polygon / fc from map extent</title>
      <link>https://community.esri.com/t5/python-questions/create-polygon-fc-from-map-extent/m-p/140984#M10972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In most cases (mutually exclusive index features), you could use Spatial Join for this but not necessarily for more complex cases (e.g. coincident or overlapping index features).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Oct 2015 20:18:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-polygon-fc-from-map-extent/m-p/140984#M10972</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2015-10-07T20:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: Create polygon / fc from map extent</title>
      <link>https://community.esri.com/t5/python-questions/create-polygon-fc-from-map-extent/m-p/140985#M10973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was thinking you could use Match Option HAVE_THEIR_CENTER_IN and get the desired results.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Oct 2015 20:32:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-polygon-fc-from-map-extent/m-p/140985#M10973</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2015-10-07T20:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: Create polygon / fc from map extent</title>
      <link>https://community.esri.com/t5/python-questions/create-polygon-fc-from-map-extent/m-p/140986#M10974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, that would work most of the time, although some index features may not cover the center of the map extent, and the center of some map extents may cover multiple index features. Whether or not that matters would depend on why you wanted to know which feature produced which map extent, or if any would do.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Oct 2015 21:01:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-polygon-fc-from-map-extent/m-p/140986#M10974</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2015-10-07T21:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: Create polygon / fc from map extent</title>
      <link>https://community.esri.com/t5/python-questions/create-polygon-fc-from-map-extent/m-p/140987#M10975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I initially used the Spatial Join geoprocessing tool using the matching option HAVE_THEIR_CENTER_IN, however as Darren eluded to, some index features do not cover the center of the map extent while several others cover multiple index features.&amp;nbsp; The CONTAINS option works similar as well, however there are several index features contained in each map extent so there will be a large amount of manual QC involved by going this route.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2015 12:32:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-polygon-fc-from-map-extent/m-p/140987#M10975</guid>
      <dc:creator>CraigPrisland1</dc:creator>
      <dc:date>2015-10-08T12:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: Create polygon / fc from map extent</title>
      <link>https://community.esri.com/t5/python-questions/create-polygon-fc-from-map-extent/m-p/140988#M10976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have found a workaround to incorporate the attributes into the &lt;STRONG&gt;Polygon_Extent&lt;/STRONG&gt; output from the index layer from Data Driven Pages by first sorting my map in ascending alphabetical order and then running the script.&amp;nbsp; The polygons are then created in order.&amp;nbsp; By using the FID field, I can then join it with the index layer when I create a temporary field in that layer and add ascending values into this field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did have one other question to see if this is feasible.&amp;nbsp; My map pages have an engineering scale tied to each page (i.e 1" = 210') using the following expression in the text:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SCALE: 1" = &amp;lt;dyn type="dataFrame" name="DataFrameName"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;property="scale" pageUnits="in" mapUnits="ft" pageValue="1"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;decimalPlaces="0"/&amp;gt;'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would it be possible to get this value into the &lt;STRONG&gt;Polygon_Extent&lt;/STRONG&gt; output file as well?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for your assistance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Oct 2015 14:47:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-polygon-fc-from-map-extent/m-p/140988#M10976</guid>
      <dc:creator>CraigPrisland1</dc:creator>
      <dc:date>2015-10-09T14:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: Create polygon / fc from map extent</title>
      <link>https://community.esri.com/t5/python-questions/create-polygon-fc-from-map-extent/m-p/140989#M10977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe you can grab the scale inside the loop, once you've got your &lt;A href="http://resources.arcgis.com/de/help/main/10.1/index.html#//00s300000003000000" rel="nofollow noopener noreferrer" target="_blank"&gt;dataframe &lt;/A&gt;object, using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;scale = dataframe.scale&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will return an absolute scale for the dataframe, like 5000 would equal a scale of 1:5000. You could then do some math to calculate how many feet would equal one inch. For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;scale = dataframe.scale # e.g. 5000
engScale = '1 inch = ' + int(scale/12) + ' feet' # returns "1 inch = 417 feet"&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can escape quotes inside the string, but that's an extra step for me. &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:46:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-polygon-fc-from-map-extent/m-p/140989#M10977</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2021-12-11T07:46:33Z</dc:date>
    </item>
    <item>
      <title>Re: Create polygon / fc from map extent</title>
      <link>https://community.esri.com/t5/python-questions/create-polygon-fc-from-map-extent/m-p/140990#M10978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Old thread I know - but&amp;nbsp;there is now an easy way in case anyone searching...&lt;/P&gt;&lt;P&gt;arcpy.Extent has a polygon&amp;nbsp;property&amp;nbsp;that neatly returns the extent as a polygon&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;ex&amp;nbsp; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; extent&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;polygon‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2018 14:43:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-polygon-fc-from-map-extent/m-p/140990#M10978</guid>
      <dc:creator>AmbroseClarke</dc:creator>
      <dc:date>2018-11-21T14:43:48Z</dc:date>
    </item>
  </channel>
</rss>

