<?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: How to create a shp with specific attributes from txt file in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-create-a-shp-with-specific-attributes-from/m-p/456005#M35838</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;works excellent thank you Mr. Earley&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Jun 2015 17:27:53 GMT</pubDate>
    <dc:creator>KONPETROV</dc:creator>
    <dc:date>2015-06-01T17:27:53Z</dc:date>
    <item>
      <title>How to create a shp with specific attributes from txt file</title>
      <link>https://community.esri.com/t5/python-questions/how-to-create-a-shp-with-specific-attributes-from/m-p/455996#M35829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times; font-size: 12pt;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Hi, i have the following code:&lt;/SPAN&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;&lt;CODE&gt;&lt;SPAN class="kwd" style="color: #8a4a0b; font-size: 12px;"&gt;import&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000; font-size: 12px;"&gt; arcgisscripting
gp &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680; font-size: 12px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000; font-size: 12px;"&gt; arcgisscripting&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680; font-size: 12px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000; font-size: 12px;"&gt;create&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680; font-size: 12px;"&gt;()&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000; font-size: 12px;"&gt;
&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000; font-size: 12px;"&gt;input &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680; font-size: 12px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000; font-size: 12px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #145680; font-size: 12px;"&gt;"c:/Borders/home.txt"&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000; font-size: 12px;"&gt;
inSep &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680; font-size: 12px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000; font-size: 12px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #800000; font-size: 12px;"&gt;"."&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000; font-size: 12px;"&gt;
output &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680; font-size: 12px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000; font-size: 12px;"&gt; "c:/Borders/outtext.txt"&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000; font-size: 12px;"&gt;
gp&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680; font-size: 12px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ" style="color: #2b91af; font-size: 12px;"&gt;CreateFeaturesFromTextFile&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680; font-size: 12px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000; font-size: 12px;"&gt;input&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680; font-size: 12px;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000; font-size: 12px;"&gt; inSep&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680; font-size: 12px;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000; font-size: 12px;"&gt; output&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680; font-size: 12px;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000; font-size: 12px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #800000; font-size: 12px;"&gt;"#"&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680; font-size: 12px;"&gt;)&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #303030; font-size: 12pt;"&gt;And my point txt is in that form:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #303030; font-size: 12pt; font-family: arial, helvetica, sans-serif;"&gt;Point&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #303030; font-family: arial, helvetica, sans-serif; font-size: 12pt;"&gt;&lt;CODE&gt;&lt;SPAN class="lit"&gt;0&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit"&gt;8674596.8&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit"&gt;9856351.9&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit"&gt;100.967430980&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lit" style="font-size: 12pt; color: #303030; font-family: arial, helvetica, sans-serif;"&gt;End&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lit" style="font-size: 12pt; color: #303030; font-family: arial, helvetica, sans-serif;"&gt;But the point i am getting doesn't have the third column. Why is that happening?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:19:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-create-a-shp-with-specific-attributes-from/m-p/455996#M35829</guid>
      <dc:creator>KONPETROV</dc:creator>
      <dc:date>2021-12-11T20:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a shp with specific attributes from txt file</title>
      <link>https://community.esri.com/t5/python-questions/how-to-create-a-shp-with-specific-attributes-from/m-p/455997#M35830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried putting in a zero for the &lt;EM&gt;m&lt;/EM&gt; value?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The documentation states that if the &lt;EM&gt;z&lt;/EM&gt; and &lt;EM&gt;m&lt;/EM&gt; values are not provided then they will be assigned a null value but the tool may be expecting none or both to be specified.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would be a simple test:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Point&lt;/P&gt;&lt;P&gt;0 8674596.8 9856351.9 100.967430980 0.0&lt;/P&gt;&lt;P&gt;End&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 31 May 2015 22:44:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-create-a-shp-with-specific-attributes-from/m-p/455997#M35830</guid>
      <dc:creator>OwenEarley</dc:creator>
      <dc:date>2015-05-31T22:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a shp with specific attributes from txt file</title>
      <link>https://community.esri.com/t5/python-questions/how-to-create-a-shp-with-specific-attributes-from/m-p/455998#M35831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the 3rd column is the z value if the first is an id.&amp;nbsp; You have to creat pointZ file if you want the&amp;nbsp; z values within the point.&amp;nbsp; I would suggest that you create the point with X and Y and assign the z as a field.&lt;/P&gt;&lt;P&gt;Also, separating by space would be smarter than a period&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also see other suggestions here &lt;A href="http://gis.stackexchange.com/questions/149240/creating-shp-from-txt-files-using-arcpy" title="http://gis.stackexchange.com/questions/149240/creating-shp-from-txt-files-using-arcpy"&gt;arcgis desktop - Creating shp from txt files using ArcPy? - Geographic Information Systems Stack Exchange&lt;/A&gt;&amp;nbsp; in case someone is just starting to research a solution&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 00:03:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-create-a-shp-with-specific-attributes-from/m-p/455998#M35831</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-06-01T00:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a shp with specific attributes from txt file</title>
      <link>https://community.esri.com/t5/python-questions/how-to-create-a-shp-with-specific-attributes-from/m-p/455999#M35832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the last column is just a value for the specific point not a z or an m value. Can't that be? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 02:19:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-create-a-shp-with-specific-attributes-from/m-p/455999#M35832</guid>
      <dc:creator>KONPETROV</dc:creator>
      <dc:date>2015-06-01T02:19:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a shp with specific attributes from txt file</title>
      <link>https://community.esri.com/t5/python-questions/how-to-create-a-shp-with-specific-attributes-from/m-p/456000#M35833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;unfortunately nothing changes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 02:21:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-create-a-shp-with-specific-attributes-from/m-p/456000#M35833</guid>
      <dc:creator>KONPETROV</dc:creator>
      <dc:date>2015-06-01T02:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a shp with specific attributes from txt file</title>
      <link>https://community.esri.com/t5/python-questions/how-to-create-a-shp-with-specific-attributes-from/m-p/456001#M35834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this is an iteresting code i 've found from (&lt;A href="http://gis.stackexchange.com/questions/149240/creating-shp-from-txt-files-using-arcpy?noredirect=1#comment218408_149240" title="http://gis.stackexchange.com/questions/149240/creating-shp-from-txt-files-using-arcpy?noredirect=1#comment218408_149240"&gt;http://gis.stackexchange.com/questions/149240/creating-shp-from-txt-files-using-arcpy?noredirect=1#comment218408_149240&lt;/A&gt; ) but for some reason is not working for my data. I am posting it here: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE style="font-size: 12px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #222222;"&gt;&lt;SPAN class="kwd" style="font-size: 12px; color: #8a4a0b;"&gt;import&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt; arcpy&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt; os&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="com" style="font-size: 12px; color: #868686;"&gt;# Read txt file&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;&lt;BR /&gt;tmp &lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;[&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;line&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;split&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;()&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="font-size: 12px; color: #8a4a0b;"&gt;for&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt; line &lt;/SPAN&gt;&lt;SPAN class="kwd" style="font-size: 12px; color: #8a4a0b;"&gt;in&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt; open&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;r&lt;/SPAN&gt;&lt;SPAN class="str" style="font-size: 12px; color: #800000;"&gt;'C:\temp\txtfile.txt'&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;)]&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="str" style="font-size: 12px; color: #800000;"&gt;"""&lt;BR /&gt;Clean txt file and prepare for Insert Cursor&lt;BR /&gt;Needs to be in the following format for this example:&lt;BR /&gt;[('60.9090909091', ('347172.2', '4269952.7')),&lt;BR /&gt; ('85.7334909091', ('337172.8', '4278952.4')),&lt;BR /&gt; ('123.909673091', ('344572.3', '4547952.2')),&lt;BR /&gt; ('456.467809091', ('347532.8', '8777952.8'))]&lt;BR /&gt;"""&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;&lt;BR /&gt;row_values &lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;[]&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="kwd" style="font-size: 12px; color: #8a4a0b;"&gt;for&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt; t &lt;/SPAN&gt;&lt;SPAN class="kwd" style="font-size: 12px; color: #8a4a0b;"&gt;in&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt; tmp&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp; row_values&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;append&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;((&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;float&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;t&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;[&lt;/SPAN&gt;&lt;SPAN class="lit" style="font-size: 12px; color: #953838;"&gt;3&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;]),&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;float&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;t&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;[&lt;/SPAN&gt;&lt;SPAN class="lit" style="font-size: 12px; color: #953838;"&gt;1&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;]),&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt; float&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;t&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;[&lt;/SPAN&gt;&lt;SPAN class="lit" style="font-size: 12px; color: #953838;"&gt;2&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;]))))&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="com" style="font-size: 12px; color: #868686;"&gt;# Define the shapefile&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;&lt;BR /&gt;shp &lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt; r&lt;/SPAN&gt;&lt;SPAN class="str" style="font-size: 12px; color: #800000;"&gt;'C:\temp\points.shp'&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="com" style="font-size: 12px; color: #868686;"&gt;# Define spatial reference and create shapefile. Factory code for NAD83 UTM 15N is used here&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;&lt;BR /&gt;sr &lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt; arcpy&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ" style="font-size: 12px; color: #2b91af;"&gt;SpatialReference&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="lit" style="font-size: 12px; color: #953838;"&gt;26915&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;&lt;BR /&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ" style="font-size: 12px; color: #2b91af;"&gt;CreateFeatureclass_management&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;out_path &lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt; os&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;path&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;dirname&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;shp&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;),&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt; out_name &lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt; os&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;path&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;basename&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;shp&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;),&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt; geometry_type &lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="font-size: 12px; color: #800000;"&gt;"POINT"&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt; spatial_reference &lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt; sr&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;&lt;BR /&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ" style="font-size: 12px; color: #2b91af;"&gt;AddField_management&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;shp&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="font-size: 12px; color: #800000;"&gt;"Field1"&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="font-size: 12px; color: #800000;"&gt;"DOUBLE"&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="com" style="font-size: 12px; color: #868686;"&gt;# Use InsertCursor to update rows&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;&lt;BR /&gt;cursor &lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt; arcpy&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;da&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ" style="font-size: 12px; color: #2b91af;"&gt;InsertCursor&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;shp&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;[&lt;/SPAN&gt;&lt;SPAN class="str" style="font-size: 12px; color: #800000;"&gt;'Field1'&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="str" style="font-size: 12px; color: #800000;"&gt;'SHAPE@XY'&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;])&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="kwd" style="font-size: 12px; color: #8a4a0b;"&gt;for&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt; row &lt;/SPAN&gt;&lt;SPAN class="kwd" style="font-size: 12px; color: #8a4a0b;"&gt;in&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt; row_values&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp; cursor&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;insertRow&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;row&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-size: 12px; color: #145680;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="com" style="font-size: 12px; color: #868686;"&gt;# Clean up&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="kwd" style="font-size: 12px; color: #8a4a0b;"&gt;del&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-size: 12px; color: #000000;"&gt; cursor&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 02:53:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-create-a-shp-with-specific-attributes-from/m-p/456001#M35834</guid>
      <dc:creator>KONPETROV</dc:creator>
      <dc:date>2015-06-01T02:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a shp with specific attributes from txt file</title>
      <link>https://community.esri.com/t5/python-questions/how-to-create-a-shp-with-specific-attributes-from/m-p/456002#M35835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With the old &lt;EM&gt;gp.CreateFeaturesFromTextFile&lt;/EM&gt; tool you are limited to just creating points with id, x, y, z and m values. I wouldn't bother using this old tool - getting the sample you found to work is a much better option.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 05:09:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-create-a-shp-with-specific-attributes-from/m-p/456002#M35835</guid>
      <dc:creator>OwenEarley</dc:creator>
      <dc:date>2015-06-01T05:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a shp with specific attributes from txt file</title>
      <link>https://community.esri.com/t5/python-questions/how-to-create-a-shp-with-specific-attributes-from/m-p/456003#M35836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This example assumes the text file is comma separated (X, Y, Value). You will also need to change the spatial reference id and output field name to suit your needs:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy, os

# read data from file (x, y, custom value)
row_values = []
with open(r'G:\Temp\GeoNet\Script\test.txt') as f:
&amp;nbsp;&amp;nbsp;&amp;nbsp; for line in f:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tmp = line.split(',')
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row_values.append((float(tmp[0]),float(tmp[1]),float(tmp[2])))

# Define the shapefile
shp = r'G:\Temp\GeoNet\Script\pts.shp'

# Define spatial reference and create shapefile.
sr = arcpy.SpatialReference(28355)
arcpy.CreateFeatureclass_management (out_path = os.path.dirname(shp), out_name = os.path.basename(shp), geometry_type = "POINT", spatial_reference = sr)
arcpy.AddField_management(shp, "DataField", "DOUBLE")

# Use InsertCursor to update rows
cursor = arcpy.da.InsertCursor(shp, ['SHAPE@X','SHAPE@Y','DataField'])
for row in row_values:
&amp;nbsp;&amp;nbsp;&amp;nbsp; cursor.insertRow(row)

# Clean up
del cursor&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:19:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-create-a-shp-with-specific-attributes-from/m-p/456003#M35836</guid>
      <dc:creator>OwenEarley</dc:creator>
      <dc:date>2021-12-11T20:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a shp with specific attributes from txt file</title>
      <link>https://community.esri.com/t5/python-questions/how-to-create-a-shp-with-specific-attributes-from/m-p/456004#M35837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe I'm missing something here, but can't this just be done by using the Create XY Event Layer (&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//00170000006z000000" title="http://resources.arcgis.com/en/help/main/10.1/index.html#//00170000006z000000"&gt;ArcGIS Help 10.1&lt;/A&gt;)? You would need to export to a shapefile after, of course.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 05:43:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-create-a-shp-with-specific-attributes-from/m-p/456004#M35837</guid>
      <dc:creator>SepheFox</dc:creator>
      <dc:date>2015-06-01T05:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a shp with specific attributes from txt file</title>
      <link>https://community.esri.com/t5/python-questions/how-to-create-a-shp-with-specific-attributes-from/m-p/456005#M35838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;works excellent thank you Mr. Earley&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 17:27:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-create-a-shp-with-specific-attributes-from/m-p/456005#M35838</guid>
      <dc:creator>KONPETROV</dc:creator>
      <dc:date>2015-06-01T17:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a shp with specific attributes from txt file</title>
      <link>https://community.esri.com/t5/python-questions/how-to-create-a-shp-with-specific-attributes-from/m-p/456006#M35839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I&amp;nbsp; could do that also Ms Fox, but i don't know what the first line of my txt should be, also the last column is not z or m value but a value i just need for each point&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 17:32:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-create-a-shp-with-specific-attributes-from/m-p/456006#M35839</guid>
      <dc:creator>KONPETROV</dc:creator>
      <dc:date>2015-06-01T17:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a shp with specific attributes from txt file</title>
      <link>https://community.esri.com/t5/python-questions/how-to-create-a-shp-with-specific-attributes-from/m-p/456007#M35840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kon, The first line of your text would just be the field headings (x, y, value). A z or m value is not required. The tool converts your xy values to points, and maintains the other value fields as required. I just did a quick test of made up data of 3 points. It worked great. This was a simple notepad file with tabs between values:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/105529_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 17:55:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-create-a-shp-with-specific-attributes-from/m-p/456007#M35840</guid>
      <dc:creator>SepheFox</dc:creator>
      <dc:date>2015-06-01T17:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a shp with specific attributes from txt file</title>
      <link>https://community.esri.com/t5/python-questions/how-to-create-a-shp-with-specific-attributes-from/m-p/456008#M35841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ms Fox just to try it, i brought my data to that form&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;x,y,value
674596.8 9856351.9 100.967430980&lt;/PRE&gt;&lt;P&gt;and although the text in ArcMap has correctly put each number in x,y,value column when it comes to make x,y event layer i get an 000212 error. I tried the same with comma(,) and a space also but was the same.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:19:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-create-a-shp-with-specific-attributes-from/m-p/456008#M35841</guid>
      <dc:creator>KONPETROV</dc:creator>
      <dc:date>2021-12-11T20:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a shp with specific attributes from txt file</title>
      <link>https://community.esri.com/t5/python-questions/how-to-create-a-shp-with-specific-attributes-from/m-p/456009#M35842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Make sure that the delimiters are the same for your column headings and values, for example use commas:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="background-color: inherit; color: black; font-weight: inherit; font-size: 9pt !important; font-style: inherit;"&gt;x,y,value&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important; background-color: inherit;"&gt;674596.8&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important; background-color: inherit;"&gt;9856351.9&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important; background-color: inherit;"&gt;100.967430980&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="background-color: inherit; color: black; font-weight: inherit; font-size: 9pt !important; font-style: inherit;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:19:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-create-a-shp-with-specific-attributes-from/m-p/456009#M35842</guid>
      <dc:creator>OwenEarley</dc:creator>
      <dc:date>2021-12-11T20:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a shp with specific attributes from txt file</title>
      <link>https://community.esri.com/t5/python-questions/how-to-create-a-shp-with-specific-attributes-from/m-p/456010#M35843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I can see in your code snippet, you used comma separators for the first line, and then space or tab for the subsequent line. They would need to be the same. As I said, I used tab with no difficulties at all. The error description states:&lt;/P&gt;&lt;P&gt;"Verify that you have entered the correct parameters for this operation and that the data contained in the X and Y fields is in the correct format. The fields must be numeric to be displayed. For example, if the coordinate value is stored in degrees/minutes/seconds in a field (for example, -120 13 58), you need to convert the values to decimal degrees and store them in a numeric field. In addition, some characters in field names are not supported, such as dashes (for example, x-coord for the field name), spaces, and brackets. Before adding x,y data, you should edit the field names to remove these characters. For example, you can use the underscore character instead of the dash character in field names. For more information, see the &lt;A class="xref" href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/0017/00170000006z000000.htm" rel="/en/arcgisdesktop/10.0/help/0017/00170000006z000000.htm"&gt;Make XY Event Layer&lt;/A&gt; tool help." so you should make sure you don't have any of these issues first.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 23:25:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-create-a-shp-with-specific-attributes-from/m-p/456010#M35843</guid>
      <dc:creator>SepheFox</dc:creator>
      <dc:date>2015-06-01T23:25:46Z</dc:date>
    </item>
  </channel>
</rss>

