<?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: Load features from database in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/load-features-from-database/m-p/118685#M9368</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It could be that the output is being used to produce a numpy structured array from which you can convert to a point featureclass.&amp;nbsp; Is that the only thing that is in the data file (ie any header lines) ?&amp;nbsp; If so, it can be readily brought.&amp;nbsp; The sample code would be useful to see if they are using numpy's loadtxt or similar approach.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 25 Mar 2017 01:20:58 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2017-03-25T01:20:58Z</dc:date>
    <item>
      <title>Load features from database</title>
      <link>https://community.esri.com/t5/python-questions/load-features-from-database/m-p/118684#M9367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, I'm quite new to ArcGIS, but I've been struggling to find documentation showing how to do what I need. If someone could provide a code fragment, or point me towards existing samples, I'd appreciate it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a Teradata table loaded with ST_GEOMETRY points. When I query the table, the results look like:&lt;/P&gt;&lt;PRE&gt;POINT (35.856971 -86.370195)&lt;/PRE&gt;&lt;P&gt;I understand this is ArcGIS's native format, but I don't understand how to load this&amp;nbsp;directly into a Feature Class. I inherited some existing code which converts a string into a list into a Numpy array into NumPyArrayToFeatureClass(), but all that shouldn't be necessary, right?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Mar 2017 14:08:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/load-features-from-database/m-p/118684#M9367</guid>
      <dc:creator>JasonDavis3</dc:creator>
      <dc:date>2017-03-24T14:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: Load features from database</title>
      <link>https://community.esri.com/t5/python-questions/load-features-from-database/m-p/118685#M9368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It could be that the output is being used to produce a numpy structured array from which you can convert to a point featureclass.&amp;nbsp; Is that the only thing that is in the data file (ie any header lines) ?&amp;nbsp; If so, it can be readily brought.&amp;nbsp; The sample code would be useful to see if they are using numpy's loadtxt or similar approach.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Mar 2017 01:20:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/load-features-from-database/m-p/118685#M9368</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-03-25T01:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: Load features from database</title>
      <link>https://community.esri.com/t5/python-questions/load-features-from-database/m-p/118686#M9369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can show sample code, but I'm not trying to improve it or anything. The text file layout was kinda weird--we're not using it any more.&amp;nbsp;The coordinates are now in a Teradata table loaded with ST_GEOMETRY points, along with some additional data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;csv_f = csv.reader(f)
for row in csv_f:
&amp;nbsp; &amp;nbsp; mbr = [(row[0], row[1], row[2], (row[1], row[2]))]
&amp;nbsp; &amp;nbsp; dstMbrList.append(mbr)
f.close()
in_fc = dataPath + "a2c_output.gdb/spatialRefXY"
spatial_ref = arcpy.Describe(in_fc).spatialReference
typez = numpy.dtype=[('id', 'S23'), ('X', 'f8'), ('Y', 'f8'), ('XY', '&amp;lt;f8', 2)]
prv_arr = numpy.array(dstPrvList, typez)
out_prv_fc = dataPath + "a2c_output.gdb/outDstPrvTestXY01"
if arcpy.Exists(out_prv_fc):
&amp;nbsp; &amp;nbsp; arcpy.Delete_management(out_prv_fc)
arcpy.da.NumPyArrayToFeatureClass(prv_arr, out_prv_fc, ['XY'], spatial_ref)&lt;/PRE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As long as I end up with the FeatureClass at the end, we're happy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:02:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/load-features-from-database/m-p/118686#M9369</guid>
      <dc:creator>JasonDavis3</dc:creator>
      <dc:date>2021-12-12T16:02:17Z</dc:date>
    </item>
  </channel>
</rss>

