<?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 insert records in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/insert-records/m-p/404089#M31827</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The following code returns records from polygon shape file. The shape is returned as object.&lt;BR /&gt;How this object can be converted to array or list of coordinates so that it can be inserted into &lt;BR /&gt;oracle spatial table in MDSYS.SDO_ORDINATE_ARRAY&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;import arcpy&lt;BR /&gt;fc = "C:\\roads.shp"&lt;BR /&gt;fields = ["idnumber", "shape@"]&lt;/P&gt;&lt;P&gt;with arcpy.da.SearchCursor(fc, fields) as cursor:&lt;BR /&gt; for row in cursor:&lt;BR /&gt; print ("{0},{1}".format(row[0], row[1]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pms,&amp;lt;geoprocessing describe geometry object object at 0x028D1FC0&amp;gt;&lt;BR /&gt;xrz,&amp;lt;geoprocessing describe geometry object object at 0x028D4100&amp;gt;&lt;BR /&gt;avx,&amp;lt;geoprocessing describe geometry object object at 0x028D1FC0&amp;gt;&lt;BR /&gt;cbm,&amp;lt;geoprocessing describe geometry object object at 0x028D4100&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Dec 2016 08:27:03 GMT</pubDate>
    <dc:creator>jayasudha</dc:creator>
    <dc:date>2016-12-20T08:27:03Z</dc:date>
    <item>
      <title>insert records</title>
      <link>https://community.esri.com/t5/python-questions/insert-records/m-p/404089#M31827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The following code returns records from polygon shape file. The shape is returned as object.&lt;BR /&gt;How this object can be converted to array or list of coordinates so that it can be inserted into &lt;BR /&gt;oracle spatial table in MDSYS.SDO_ORDINATE_ARRAY&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;import arcpy&lt;BR /&gt;fc = "C:\\roads.shp"&lt;BR /&gt;fields = ["idnumber", "shape@"]&lt;/P&gt;&lt;P&gt;with arcpy.da.SearchCursor(fc, fields) as cursor:&lt;BR /&gt; for row in cursor:&lt;BR /&gt; print ("{0},{1}".format(row[0], row[1]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pms,&amp;lt;geoprocessing describe geometry object object at 0x028D1FC0&amp;gt;&lt;BR /&gt;xrz,&amp;lt;geoprocessing describe geometry object object at 0x028D4100&amp;gt;&lt;BR /&gt;avx,&amp;lt;geoprocessing describe geometry object object at 0x028D1FC0&amp;gt;&lt;BR /&gt;cbm,&amp;lt;geoprocessing describe geometry object object at 0x028D4100&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Dec 2016 08:27:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/insert-records/m-p/404089#M31827</guid>
      <dc:creator>jayasudha</dc:creator>
      <dc:date>2016-12-20T08:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: insert records</title>
      <link>https://community.esri.com/t5/python-questions/insert-records/m-p/404090#M31828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-classes/geometry.htm"&gt;ArcPy Geometry &lt;/A&gt;class supports several data interchange formats (WKT, WKB, JSON/GeoJSON), and the &lt;A href="https://docs.oracle.com/database/121/SPATL/GUID-7A79F1C4-FABF-432A-AF94-9E9CB23BBFBA.htm#SPATL180"&gt;SDO_UTIL Package &lt;/A&gt;also works with some of those formats.&amp;nbsp; Instead of trying to dump coordinates and build arrays, I would explore dumping WKT/WKB and importing it that way into Oracle.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Dec 2016 13:20:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/insert-records/m-p/404090#M31828</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2016-12-20T13:20:48Z</dc:date>
    </item>
  </channel>
</rss>

