<?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: Export XY Event Source to shapefile using python in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/export-xy-event-source-to-shapefile-using-python/m-p/259565#M19978</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can just convert the table source to a Feature Class with da.NumpyArrayToFeatureClass&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas;"&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//018w0000001n000000" rel="nofollow noopener noreferrer" target="_blank"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//018w0000001n000000&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
import numpy
from numpy import genfromtxt

csvFile = r'myfile.csv'
dfarr = genfromtxt(csvFile,delimiter=',')
arrayToConvert = numpy.array(dfarr, numpy.dtype([('X', '&amp;lt;f8'),('Y', '&amp;lt;f8')]))
output = 'H:\Documents\Default.gdb\NumpyToFC'
if arcpy.Exists(output):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Delete_management(output)

arcpy.da.NumPyArrayToFeatureClass(arrayToConvert, output, ("X", "Y")) &lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 12:46:48 GMT</pubDate>
    <dc:creator>JamesCrandall</dc:creator>
    <dc:date>2021-12-11T12:46:48Z</dc:date>
    <item>
      <title>Export XY Event Source to shapefile using python</title>
      <link>https://community.esri.com/t5/python-questions/export-xy-event-source-to-shapefile-using-python/m-p/259563#M19976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Manually, one can export an XY Event Source to a shapefile by right-clicking on it, then selecting Data&amp;gt;Export Data.&amp;nbsp; How would I automate this using Python?&amp;nbsp; There doesn't seem to be a tool for this.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2015 19:20:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/export-xy-event-source-to-shapefile-using-python/m-p/259563#M19976</guid>
      <dc:creator>NatalieZeleznik</dc:creator>
      <dc:date>2015-04-08T19:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: Export XY Event Source to shapefile using python</title>
      <link>https://community.esri.com/t5/python-questions/export-xy-event-source-to-shapefile-using-python/m-p/259564#M19977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried &lt;A href="http://resources.arcgis.com/en/help/main/10.2/#/Copy_Features/001700000035000000/"&gt;Copy Features&lt;/A&gt;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2015 20:36:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/export-xy-event-source-to-shapefile-using-python/m-p/259564#M19977</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2015-04-08T20:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: Export XY Event Source to shapefile using python</title>
      <link>https://community.esri.com/t5/python-questions/export-xy-event-source-to-shapefile-using-python/m-p/259565#M19978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can just convert the table source to a Feature Class with da.NumpyArrayToFeatureClass&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas;"&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//018w0000001n000000" rel="nofollow noopener noreferrer" target="_blank"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//018w0000001n000000&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
import numpy
from numpy import genfromtxt

csvFile = r'myfile.csv'
dfarr = genfromtxt(csvFile,delimiter=',')
arrayToConvert = numpy.array(dfarr, numpy.dtype([('X', '&amp;lt;f8'),('Y', '&amp;lt;f8')]))
output = 'H:\Documents\Default.gdb\NumpyToFC'
if arcpy.Exists(output):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Delete_management(output)

arcpy.da.NumPyArrayToFeatureClass(arrayToConvert, output, ("X", "Y")) &lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:46:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/export-xy-event-source-to-shapefile-using-python/m-p/259565#M19978</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2021-12-11T12:46:48Z</dc:date>
    </item>
  </channel>
</rss>

