<?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 shapefile from a python list using ArcPy? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-create-a-shapefile-from-a-python-list-using/m-p/699497#M54213</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;It's for constructing a query that returns no results. It's the quick and dirty way of creating an empty template from an existing feature class.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It is sql then....'''{0} &amp;lt; 0'' ... fascinating. If the condition is less then 0 then ...go forward... with the .format command?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Apr 2014 16:38:36 GMT</pubDate>
    <dc:creator>ArielleSimmons</dc:creator>
    <dc:date>2014-04-22T16:38:36Z</dc:date>
    <item>
      <title>How to create a shapefile from a python list using ArcPy?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-create-a-shapefile-from-a-python-list-using/m-p/699486#M54202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've been looking for a way to create a shapefile from a python list (in the case below, uniqueList).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Basically, I have been using SearchCursor's to iterate through a shapefile, and I would like to export the result as a shapefile...I tried CopyFeatures...but it didn't even return a blank file (it returned nothing).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;import arcpy

def find_overlaps(input_features, output_features):
&amp;nbsp;&amp;nbsp; uniqueList = []
&amp;nbsp;&amp;nbsp; for row in arcpy.da.SearchCursor(input_features, ('OBJECTID', 'SHAPE@', 'name')):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foundMatch = False
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row2 in uniqueList:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if row[1].equals(row2[1]):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foundMatch = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if foundMatch == False
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uniqueList.append(row)
&amp;nbsp;&amp;nbsp; return uniqueList
&amp;nbsp;&amp;nbsp; ## no work ##
&amp;nbsp;&amp;nbsp; arcpy.management.CopyFeatures(uniqueList, output_features)&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 14:07:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-create-a-shapefile-from-a-python-list-using/m-p/699486#M54202</guid>
      <dc:creator>ArielleSimmons</dc:creator>
      <dc:date>2014-04-22T14:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a shapefile from a python list using ArcPy?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-create-a-shapefile-from-a-python-list-using/m-p/699487#M54203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Perhaps SelectLayerByAttribute to get your selection, then CopyFeatures is a better alternative?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//001700000071000000"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//001700000071000000&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 14:13:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-create-a-shapefile-from-a-python-list-using/m-p/699487#M54203</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2014-04-22T14:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a shapefile from a python list using ArcPy?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-create-a-shapefile-from-a-python-list-using/m-p/699488#M54204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Perhaps SelectLayerByAttribute to get your selection, then CopyFeatures is a better alternative?&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//001700000071000000"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//001700000071000000&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Unfortunately the 'ARE_IDENTICAL_TO' in Select wasn't picking up any of my duplicate geometries in my test set...(go, fig. Maybe floating point error? They are lines). I tested in both GUI and code. This was the only way to grab them...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 14:17:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-create-a-shapefile-from-a-python-list-using/m-p/699488#M54204</guid>
      <dc:creator>ArielleSimmons</dc:creator>
      <dc:date>2014-04-22T14:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a shapefile from a python list using ArcPy?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-create-a-shapefile-from-a-python-list-using/m-p/699489#M54205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Nothing after your return is run. Return basically ends the function.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 14:31:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-create-a-shapefile-from-a-python-list-using/m-p/699489#M54205</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2014-04-22T14:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a shapefile from a python list using ArcPy?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-create-a-shapefile-from-a-python-list-using/m-p/699490#M54206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Unfortunately the 'ARE_IDENTICAL_TO' in Select wasn't picking up any of my duplicate geometries in my test set...(go, fig. Maybe floating point error? They are lines). I tested in both GUI and code. This was the only way to grab them...&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What if you apply a small buffer/distance_within in your selection process to try and eliminate the floating point issue? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Otherwise it could get a little messy beacause I think you would have to write coordinate pairs of each polyline to an array, create a new InsertCursor on the destination FeatureClass, create new polylines from the arrays and write them to the destination.&amp;nbsp; Not completely un-doable tho (see the last example):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//018w0000000t000000"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//018w0000000t000000&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 14:34:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-create-a-shapefile-from-a-python-list-using/m-p/699490#M54206</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2014-04-22T14:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a shapefile from a python list using ArcPy?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-create-a-shapefile-from-a-python-list-using/m-p/699491#M54207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Nothing after your return is run. Return basically ends the function.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You are absolutely right (and I need more coffee). My write-up was bad. &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;CopyFeatures is still not my friend though... "raise e, RuntimeError: Object: Error in executing tool"...hm&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy

def find_overlaps(input_features, output_features):
&amp;nbsp;&amp;nbsp; uniqueList = []
&amp;nbsp;&amp;nbsp; for row in arcpy.da.SearchCursor(input_features, ('OBJECTID', 'SHAPE@', 'name')):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foundMatch = False
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row2 in uniqueList:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if row[1].equals(row2[1]):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foundMatch = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if foundMatch == False
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uniqueList.append(row)
&amp;nbsp;&amp;nbsp; ## no work ##
&amp;nbsp;&amp;nbsp; arcpy.management.CopyFeatures(uniqueList, output_features)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:27:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-create-a-shapefile-from-a-python-list-using/m-p/699491#M54207</guid>
      <dc:creator>ArielleSimmons</dc:creator>
      <dc:date>2021-12-12T05:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a shapefile from a python list using ArcPy?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-create-a-shapefile-from-a-python-list-using/m-p/699492#M54208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes you will need to make your features a layer of some sort before you copy them out. It will not accept a raw list of features as tuples. A better way to go about this might be to use an insert cursor.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 14:42:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-create-a-shapefile-from-a-python-list-using/m-p/699492#M54208</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2014-04-22T14:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a shapefile from a python list using ArcPy?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-create-a-shapefile-from-a-python-list-using/m-p/699493#M54209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Yes you will need to make your features a layer of some sort before you copy them out. It will not accept a raw list of features as tuples. A better way to go about this might be to use an insert cursor.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Just trying to follow...you mean use an InsertCursor instead of SearchCursor?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 14:46:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-create-a-shapefile-from-a-python-list-using/m-p/699493#M54209</guid>
      <dc:creator>ArielleSimmons</dc:creator>
      <dc:date>2014-04-22T14:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a shapefile from a python list using ArcPy?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-create-a-shapefile-from-a-python-list-using/m-p/699494#M54210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Just trying to follow...you mean use an InsertCursor instead of SearchCursor?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;No, you will need to create an empty output feature class template based on your source feature class.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is how I do it. You may want to use some field mapping depending on if you need to limit the fields from source to output.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
template_query = '''{0} &amp;lt; 0'''.format(
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddFieldDelimiters(input_fc, arcpy.Describe(input_fc).OIDFieldName))

arcpy.TableToTable_conversion(input_fc, out_dir, output_fc, template_query)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then for each row you want in your output, you put it directly in the output with the insert cursor.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe something like this all together.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy

def find_overlaps(input_features, output_features):

&amp;nbsp;&amp;nbsp;&amp;nbsp; template_query = '''{0} &amp;lt; 0'''.format(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddFieldDelimiters(input_features, arcpy.Describe(input_features).OIDFieldName))

&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.FeatureClassToFeatureClass_conversion(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input_features, out_dir, output_features, template_query)

&amp;nbsp;&amp;nbsp;&amp;nbsp; field_list = ('OBJECTID', 'SHAPE@', 'name')

&amp;nbsp;&amp;nbsp;&amp;nbsp; with arcpy.da.InsertCursor(input_features, field_list) as insert_cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uniqueList = []

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in arcpy.da.SearchCursor(input_features, field_list):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for shape in uniqueList:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if row[1].equals(shape):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foundMatch = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if not foundMatch:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; insert_cursor.insertRow(row)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uniqueList.append(row[1])&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:27:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-create-a-shapefile-from-a-python-list-using/m-p/699494#M54210</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2021-12-12T05:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a shapefile from a python list using ArcPy?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-create-a-shapefile-from-a-python-list-using/m-p/699495#M54211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok. I see.... Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;By the way, I've never seen this type of inline comment before... '''{0} &amp;lt; 0''' ... what is that? Is that .. sql notation?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;template_query = '''{0} &amp;lt; 0'''.format(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddFieldDelimiters(input_fc, arcpy.Describe(input_fc).OIDFieldName))&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 16:15:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-create-a-shapefile-from-a-python-list-using/m-p/699495#M54211</guid>
      <dc:creator>ArielleSimmons</dc:creator>
      <dc:date>2014-04-22T16:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a shapefile from a python list using ArcPy?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-create-a-shapefile-from-a-python-list-using/m-p/699496#M54212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It's for constructing a query that returns no results. It's the quick and dirty way of creating an empty template from an existing feature class.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 16:17:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-create-a-shapefile-from-a-python-list-using/m-p/699496#M54212</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2014-04-22T16:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a shapefile from a python list using ArcPy?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-create-a-shapefile-from-a-python-list-using/m-p/699497#M54213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;It's for constructing a query that returns no results. It's the quick and dirty way of creating an empty template from an existing feature class.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It is sql then....'''{0} &amp;lt; 0'' ... fascinating. If the condition is less then 0 then ...go forward... with the .format command?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 16:38:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-create-a-shapefile-from-a-python-list-using/m-p/699497#M54213</guid>
      <dc:creator>ArielleSimmons</dc:creator>
      <dc:date>2014-04-22T16:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a shapefile from a python list using ArcPy?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-create-a-shapefile-from-a-python-list-using/m-p/699498#M54214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;It is sql then....'''{0} &amp;lt; 0'' ... fascinating. If the condition is less then 0 then ...go forward... with the .format command?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It is just simple string substitution. The format method is just inserting the delimited OID field name. It's broken onto two lines to ease readability.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
template_query = '''{0} &amp;lt; 0'''.format(arcpy.AddFieldDelimiters(input_fc, arcpy.Describe(input_fc).OIDFieldName))&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://docs.python.org/2/library/string.html#format-string-syntax" rel="nofollow noopener noreferrer" target="_blank"&gt;https://docs.python.org/2/library/string.html#format-string-syntax&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:27:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-create-a-shapefile-from-a-python-list-using/m-p/699498#M54214</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2021-12-12T05:27:12Z</dc:date>
    </item>
  </channel>
</rss>

