<?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: Create duplicate polygons using Shape@ and Geometry objects in 10.1 in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/create-duplicate-polygons-using-shape-and-geometry/m-p/695259#M53896</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;ANSWER FOUND&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(I cant believe it was this simple....as the ESRI help was not helpful at all)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;infc = arcpy.GetParameterAsText(0)
repnum = arcpy.GetParameterAsText(1)

gRows = arcpy.da.SearchCursor(infc, "Shape@")
for row in gRows:
&amp;nbsp;&amp;nbsp;&amp;nbsp; origpoly = row
del gRows

aRows = arcpy.da.InsertCursor(infc, "Shape@")

for x in xrange(0, int(repnum)):
&amp;nbsp;&amp;nbsp;&amp;nbsp; aRows.insertRow(origpoly)
del aRows
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 05:15:55 GMT</pubDate>
    <dc:creator>DustinEdge</dc:creator>
    <dc:date>2021-12-12T05:15:55Z</dc:date>
    <item>
      <title>Create duplicate polygons using Shape@ and Geometry objects in 10.1</title>
      <link>https://community.esri.com/t5/python-questions/create-duplicate-polygons-using-shape-and-geometry/m-p/695258#M53895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Greetings All&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a shapefile with 1 polygon in it. I want my script to read the geometry of the polygon and then create multiple polygons in the same file from the original polygon.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can do this using Describe, ShapeFieldName &amp;amp; a polygon array. But I noticed new python functionality using Shape@WKT and FromWKT&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The help section is truly lacking (even by ESRI standards) and I was wondering if anyone can help me join the dots.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It looks like you can use "Shape@WKT" to extract the polygon geometry and put it into a Geometry object, like so:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;infc = "D:\\DDP_extent.shp"
infcFields = ["SHAPE@WKT"]

g = arcpy.Geometry()
gList = arcpy.CopyFeatures_management(infc, g)
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The writing geometries help section only uses arrays as the input method, but surely I could use FromWkt to create a new geometry object for the InsertCursor?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Am I reading it right? or are arrays the only way to go?&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>Mon, 18 Mar 2013 21:12:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-duplicate-polygons-using-shape-and-geometry/m-p/695258#M53895</guid>
      <dc:creator>DustinEdge</dc:creator>
      <dc:date>2013-03-18T21:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: Create duplicate polygons using Shape@ and Geometry objects in 10.1</title>
      <link>https://community.esri.com/t5/python-questions/create-duplicate-polygons-using-shape-and-geometry/m-p/695259#M53896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;ANSWER FOUND&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(I cant believe it was this simple....as the ESRI help was not helpful at all)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;infc = arcpy.GetParameterAsText(0)
repnum = arcpy.GetParameterAsText(1)

gRows = arcpy.da.SearchCursor(infc, "Shape@")
for row in gRows:
&amp;nbsp;&amp;nbsp;&amp;nbsp; origpoly = row
del gRows

aRows = arcpy.da.InsertCursor(infc, "Shape@")

for x in xrange(0, int(repnum)):
&amp;nbsp;&amp;nbsp;&amp;nbsp; aRows.insertRow(origpoly)
del aRows
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:15:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-duplicate-polygons-using-shape-and-geometry/m-p/695259#M53896</guid>
      <dc:creator>DustinEdge</dc:creator>
      <dc:date>2021-12-12T05:15:55Z</dc:date>
    </item>
  </channel>
</rss>

