<?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: Error in creating Shapefile using Python in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/error-in-creating-shapefile-using-python/m-p/322113#M25090</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes i removed the code, because there was some bugs init, and i feel its better to remove it. Well thanks for the help. can you please elaborate the line 4, (*coord) ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 14 Dec 2014 17:25:50 GMT</pubDate>
    <dc:creator>AhsanAbbas</dc:creator>
    <dc:date>2014-12-14T17:25:50Z</dc:date>
    <item>
      <title>Error in creating Shapefile using Python</title>
      <link>https://community.esri.com/t5/python-questions/error-in-creating-shapefile-using-python/m-p/322110#M25087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 18pt;"&gt;&lt;STRONG style="font-size: 14.4444446563721px; line-height: 1.5;"&gt;I need to create the polygon Shape-file in python, by using given &lt;/STRONG&gt;&lt;STRONG style="font-size: 14.4444446563721px; line-height: 1.5;"&gt;coordinates: [(0, 0), (0, ,000), &lt;/STRONG&gt;&lt;STRONG style="font-size: 14.4444446563721px; line-height: 1.5;"&gt;(1,000, 0), and (1,000, 1,000)].&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;How can i create it, i tried some methods but they don't work ? &lt;SPAN aria-label="Confused" class="emoticon-inline emoticon_confused" style="height:16px;width:16px;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Dec 2014 11:53:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-in-creating-shapefile-using-python/m-p/322110#M25087</guid>
      <dc:creator>AhsanAbbas</dc:creator>
      <dc:date>2014-12-14T11:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: Error in creating Shapefile using Python</title>
      <link>https://community.esri.com/t5/python-questions/error-in-creating-shapefile-using-python/m-p/322111#M25088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;(&lt;EM&gt;When I first wrote this reply there was a code snippet that has since been removed, which is unfortunate because it is easier for others to comment on code and it demonstrates previous efforts to solve the problem.&amp;nbsp; Although my comments might not make sense to other readers, the OP should understand them.)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reviewing ArcGIS Help for &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//00170000002p000000"&gt;Create Feature Class (Data Management&lt;/A&gt;), especially the code samples, would be helpful.&amp;nbsp; With the current approach you are taking, the &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//001700000035000000"&gt;Copy Features (Data Management)&lt;/A&gt; tool is more likely what you will need.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Dec 2014 15:26:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-in-creating-shapefile-using-python/m-p/322111#M25088</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2014-12-14T15:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: Error in creating Shapefile using Python</title>
      <link>https://community.esri.com/t5/python-questions/error-in-creating-shapefile-using-python/m-p/322112#M25089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The gist of what you need is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;outFC = #path to shapefile, ending in .shp

coords = [[0.0, 0.0],[0.0, 1.0],[1.0, 1.0],[1.0, 0.0]]
arr = arcpy.Array([arcpy.Point(*coord) for coord in coords])
pn = arcpy.Polygon(arr)
arcpy.CopyFeatures_management(pn, outFC)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:17:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-in-creating-shapefile-using-python/m-p/322112#M25089</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-11T15:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: Error in creating Shapefile using Python</title>
      <link>https://community.esri.com/t5/python-questions/error-in-creating-shapefile-using-python/m-p/322113#M25090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes i removed the code, because there was some bugs init, and i feel its better to remove it. Well thanks for the help. can you please elaborate the line 4, (*coord) ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Dec 2014 17:25:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-in-creating-shapefile-using-python/m-p/322113#M25090</guid>
      <dc:creator>AhsanAbbas</dc:creator>
      <dc:date>2014-12-14T17:25:50Z</dc:date>
    </item>
    <item>
      <title>Re: Error in creating Shapefile using Python</title>
      <link>https://community.esri.com/t5/python-questions/error-in-creating-shapefile-using-python/m-p/322114#M25091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you look at the Help for &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//018z0000006t000000" rel="nofollow noopener noreferrer" target="_blank"&gt;Point (arcpy)&lt;/A&gt;, arcpy.point takes up to five optional arguments with the first two ordered arguments being X and Y coordinates.&amp;nbsp; The coords list is a list of lists with the lists holding XY coordinate pairs.&amp;nbsp; In Python, the asterisk or splat operator is used for &lt;A href="https://docs.python.org/2/tutorial/controlflow.html#unpacking-argument-lists" rel="nofollow noopener noreferrer" target="_blank"&gt;Unpacking Argument Lists&lt;/A&gt;.&amp;nbsp; Instead of passing each argument explicitly, I used the splat operator to unpack the XY coordinate pairs and pass them together for each point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following are three different ways to pass the same XY coordinates to arcpy.point:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;coord = [1.0, 1.0]

#passing XY as indexed list elements
arcpy.Point(coord[0], coord[1])

#passing XY as named local variables
X = coord[0]
Y = coord[1]
#or
X, Y = coord
arcpy.Point(X, Y)

#passing XY using splat operator
arcpy.Point(*coord)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:17:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-in-creating-shapefile-using-python/m-p/322114#M25091</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-11T15:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: Error in creating Shapefile using Python</title>
      <link>https://community.esri.com/t5/python-questions/error-in-creating-shapefile-using-python/m-p/322115#M25092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for help &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Dec 2014 18:55:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-in-creating-shapefile-using-python/m-p/322115#M25092</guid>
      <dc:creator>AhsanAbbas</dc:creator>
      <dc:date>2014-12-14T18:55:22Z</dc:date>
    </item>
  </channel>
</rss>

