<?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: Fast Polygons Insert in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/fast-polygons-insert/m-p/684096#M52965</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;None that I know of.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, nice script!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Mar 2014 16:21:20 GMT</pubDate>
    <dc:creator>JoshuaChisholm</dc:creator>
    <dc:date>2014-03-25T16:21:20Z</dc:date>
    <item>
      <title>Fast Polygons Insert</title>
      <link>https://community.esri.com/t5/python-questions/fast-polygons-insert/m-p/684095#M52964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm currently trying to insert polygons into a feature class given a list of (ID, X coordinate, Y coordinate) from Oracle&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So far I do: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;pntsLayer = arcpy.InsertCursor(myTableLnk)

def save(cursor, list, seq):
 if seq is None or len(list) == 0:
&amp;nbsp; return
 pfeat = cursor.newRow()
 array = arcpy.Array(list)
 poly = arcpy.Polygon(array, oracle_sr)
 pfeat.SHAPE = poly
 pfeat.POLY_ID = seq
 cursor.insertRow(pfeat)

list = []
prev_seq = None

for (seq, long, lat) in data:
 pnt = arcpy.Point() # moved out before the loop?
 pnt.X = long
 pnt.Y = lat
 if prev_seq != seq:
&amp;nbsp; save(pntsLayer , list, prev_seq)
&amp;nbsp; prev_seq = seq
&amp;nbsp; list = []
 list.append(pnt)
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do I have a way to insert them faster without looping on the data? (using some kind of array / arcpy function / csv file insert)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2014 07:49:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/fast-polygons-insert/m-p/684095#M52964</guid>
      <dc:creator>TaricMalk</dc:creator>
      <dc:date>2014-03-25T07:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: Fast Polygons Insert</title>
      <link>https://community.esri.com/t5/python-questions/fast-polygons-insert/m-p/684096#M52965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;None that I know of.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, nice script!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2014 16:21:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/fast-polygons-insert/m-p/684096#M52965</guid>
      <dc:creator>JoshuaChisholm</dc:creator>
      <dc:date>2014-03-25T16:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: Fast Polygons Insert</title>
      <link>https://community.esri.com/t5/python-questions/fast-polygons-insert/m-p/684097#M52966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you aren't already, you may find much better performance in copying the oracle coordinate table locally, creating the polygon geom/feature class locally, and then appending the new features to your SDE-based featureclass&amp;nbsp; What you are doing seems legit, but reading/writing across the network can be quite slow. Usually I copy everything local first, create the product/data, and then post to the network.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2014 18:31:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/fast-polygons-insert/m-p/684097#M52966</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2014-03-25T18:31:15Z</dc:date>
    </item>
  </channel>
</rss>

