<?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 .txt to .shp with Python script question in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/txt-to-shp-with-python-script-question/m-p/609352#M47586</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Hey all,&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;I am working through Zanderberg's Python Scripting for Arcgis. I am on chapter 8 exercise 1 which asks me to create a box Shapefile from the coordinates (0,0), (0,1,000),(1000,0),(1,000,1,000). I am able to get the code work, but the final output looks like two triangles and not a box. I decided to remove one of the coordinates an indeed got a proper triangle so I am wondering if it has to do with how I typed out my coordinates in Notepad?&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;See the screenshot of my code, input coordinates (.txt file) and output. Any help is appreciated.&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Also:&amp;nbsp; I am new to this forum and coding in general and not sure how to code samples to show up in that snazzy window that lets me copy them so apologies for having all of this crammed into a screenshot.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Mar 2020 02:19:52 GMT</pubDate>
    <dc:creator>JonCicarelli</dc:creator>
    <dc:date>2020-03-11T02:19:52Z</dc:date>
    <item>
      <title>.txt to .shp with Python script question</title>
      <link>https://community.esri.com/t5/python-questions/txt-to-shp-with-python-script-question/m-p/609352#M47586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Hey all,&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;I am working through Zanderberg's Python Scripting for Arcgis. I am on chapter 8 exercise 1 which asks me to create a box Shapefile from the coordinates (0,0), (0,1,000),(1000,0),(1,000,1,000). I am able to get the code work, but the final output looks like two triangles and not a box. I decided to remove one of the coordinates an indeed got a proper triangle so I am wondering if it has to do with how I typed out my coordinates in Notepad?&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;See the screenshot of my code, input coordinates (.txt file) and output. Any help is appreciated.&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Also:&amp;nbsp; I am new to this forum and coding in general and not sure how to code samples to show up in that snazzy window that lets me copy them so apologies for having all of this crammed into a screenshot.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2020 02:19:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/txt-to-shp-with-python-script-question/m-p/609352#M47586</guid>
      <dc:creator>JonCicarelli</dc:creator>
      <dc:date>2020-03-11T02:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: .txt to .shp with Python script question</title>
      <link>https://community.esri.com/t5/python-questions/txt-to-shp-with-python-script-question/m-p/609353#M47587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/365273"&gt;Jon Cicarelli&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue is indeed with with order in which the coordinates are specified. When we create a polygons from points like this, arcpy is basically drawing a line between each of the points we specify, in the same order that we specify them.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So with the current order we're placing the first point in the bottom left point at 0,0, then the next point in top left at 0,1000 - which is all ok so far. Where things go askew is that the next point we place is at the bottom right at 1000,0 (instead of the top right) then finally we place a point in the top right at 1000,1000. Then lastly arcpy will always automatically place a final point at the same location of whatever we specified as the first point to ensure our polygon forms an enclosed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="484764" alt="" class="jive-emoji image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/484764_challenge1-annotated.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the text file, if we swap the position of point 3 and point 4 - the order that points are specified will then form a square instead of two triangles.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2020 02:44:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/txt-to-shp-with-python-script-question/m-p/609353#M47587</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-03-11T02:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: .txt to .shp with Python script question</title>
      <link>https://community.esri.com/t5/python-questions/txt-to-shp-with-python-script-question/m-p/609354#M47588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, James!&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2020 02:48:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/txt-to-shp-with-python-script-question/m-p/609354#M47588</guid>
      <dc:creator>JonCicarelli</dc:creator>
      <dc:date>2020-03-11T02:48:54Z</dc:date>
    </item>
  </channel>
</rss>

