<?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: populate x,y in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262282#M20159</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Darren can you explain the inserRow([row[&lt;SPAN class="number"&gt;2][&lt;SPAN class="number"&gt;0&lt;/SPAN&gt;],row[&lt;SPAN class="number"&gt;2&lt;/SPAN&gt;][&lt;SPAN class="number"&gt;1&lt;/SPAN&gt;],row[&lt;SPAN class="number"&gt;2&lt;/SPAN&gt;]]&lt;/SPAN&gt;).&lt;/P&gt;&lt;P&gt;I am trying to figure out what is going on here, [row[&lt;SPAN class="number"&gt;2][&lt;SPAN class="number"&gt;0&lt;/SPAN&gt;],row[&lt;SPAN class="number"&gt;2&lt;/SPAN&gt;][&lt;SPAN class="number"&gt;1&lt;/SPAN&gt;],row[&lt;SPAN class="number"&gt;2&lt;/SPAN&gt;]] and if you don't mind can you give an example if there were more fields please.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="number"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="number"&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Jul 2015 22:43:13 GMT</pubDate>
    <dc:creator>PacoAlverez</dc:creator>
    <dc:date>2015-07-30T22:43:13Z</dc:date>
    <item>
      <title>populate x,y</title>
      <link>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262279#M20156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to populate ever point's x,y when a point is created by a mouse click or clicking. Some times i might only create one point but sometimes i may have to create more then one. I am having trouble populating the x,y of the new created points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is currently what i have. I know it's wrong. i would like to see how to do this correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;getting error at&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;/P&gt;&lt;P&gt;&amp;nbsp; File "C:\GIS\Python\AddPoint\AddPoint_4.py", line 18, in &amp;lt;module&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; geom = prow.SHAP&lt;/P&gt;&lt;P&gt;AttributeError: 'tuple' object has no attribute 'SHAPE'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Failed to execute (Script).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;#import modules&amp;nbsp; 
import arcpy&amp;nbsp; 

arcpy.env.qualifiedFieldNames = False
pointFC = "Animal Sightings" #target point feature class Animal Sightings

mxd = arcpy.mapping.MapDocument("CURRENT")&amp;nbsp; 
df = arcpy.mapping.ListDataFrames(mxd)[0]&amp;nbsp; 
dfsr = df.spatialReference&amp;nbsp; 
fcsr = arcpy.Describe(pointFC).spatialReference&amp;nbsp; 
if dfsr.name == fcsr.name:&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; """Now do your work"""&amp;nbsp; 

point = arcpy.GetParameterAsText(0)&amp;nbsp; #click

for prow in arcpy.da.SearchCursor(point,'SHAPE@XY'):&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; x,y = prow[0]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; geom = prow.SHAPE
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; prow.x = geom.X
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; prow.y = geom.Y
del prow&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 

insCursor = arcpy.da.InsertCursor(pointFC,('POINT_X','POINT_Y','SHAPE@XY')) # create insert cursor&amp;nbsp; 

with arcpy.da.SearchCursor(point,('POINT_X','POINT_Y','SHAPE@XY')) as cursor: # loop through feature set&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; POINT_X = row[0]&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; POINT_Y = row[1]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; insCursor.insertRow(row) # insert row&amp;nbsp; 

del insCursor # delete insert cursor&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:51:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262279#M20156</guid>
      <dc:creator>PacoAlverez</dc:creator>
      <dc:date>2021-12-11T12:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: populate x,y</title>
      <link>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262280#M20157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you're overthinking this. The following works for me:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy

point = arcpy.GetParameterAsText(0)

pointFC = r'C:/junk/points.shp'

insCursor = arcpy.da.InsertCursor(pointFC,['POINT_X','POINT_Y','SHAPE@XY'])

with arcpy.da.SearchCursor(point,['POINT_X','POINT_Y','SHAPE@XY']) as cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; insCursor.insertRow([row[2][0],row[2][1],row[2]])

del insCursor&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A happy coincidence: the units recorded in the final "POINT_X" and "POINT_Y" fields will be in the units of "pointFC", regardless of the data frame's coordinate system.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:51:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262280#M20157</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2021-12-11T12:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: populate x,y</title>
      <link>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262281#M20158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Darren you were right, i see now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2015 22:00:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262281#M20158</guid>
      <dc:creator>PacoAlverez</dc:creator>
      <dc:date>2015-07-29T22:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: populate x,y</title>
      <link>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262282#M20159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Darren can you explain the inserRow([row[&lt;SPAN class="number"&gt;2][&lt;SPAN class="number"&gt;0&lt;/SPAN&gt;],row[&lt;SPAN class="number"&gt;2&lt;/SPAN&gt;][&lt;SPAN class="number"&gt;1&lt;/SPAN&gt;],row[&lt;SPAN class="number"&gt;2&lt;/SPAN&gt;]]&lt;/SPAN&gt;).&lt;/P&gt;&lt;P&gt;I am trying to figure out what is going on here, [row[&lt;SPAN class="number"&gt;2][&lt;SPAN class="number"&gt;0&lt;/SPAN&gt;],row[&lt;SPAN class="number"&gt;2&lt;/SPAN&gt;][&lt;SPAN class="number"&gt;1&lt;/SPAN&gt;],row[&lt;SPAN class="number"&gt;2&lt;/SPAN&gt;]] and if you don't mind can you give an example if there were more fields please.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="number"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="number"&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2015 22:43:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262282#M20159</guid>
      <dc:creator>PacoAlverez</dc:creator>
      <dc:date>2015-07-30T22:43:13Z</dc:date>
    </item>
    <item>
      <title>Re: populate x,y</title>
      <link>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262283#M20160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The ArcPy Data Access &lt;A href="http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-data-access/searchcursor-class.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Search Cursor &lt;/A&gt;documentation states the search cursors &lt;SPAN style="font-family: courier new,courier;"&gt;next()&lt;/SPAN&gt; method "returns the next row as a tuple."&amp;nbsp; Furthermore, the SHAPE@XY token returns a "tuple of the feature's centroid x,y coordinates," which for a point is the point itself.&amp;nbsp; (Note, this isn't necessarily the case with a Multipoint).&amp;nbsp; When a user returns the SHAPE@XY token in a search cursor, like here, there will be a tuple within a tuple.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tuples are a built-in Python data type and one of seven sequence types (&lt;A href="https://docs.python.org/2/library/stdtypes.html#sequence-types-str-unicode-list-tuple-bytearray-buffer-xrange" rel="nofollow noopener noreferrer" target="_blank"&gt;Sequence Types — str, unicode, list, tuple, bytearray, buffer, xrange&lt;/A&gt;); as such, tuples support indexing, slicing, sequence packing, and more.&amp;nbsp; &lt;A href="https://community.esri.com/migrated-users/19932" target="_blank"&gt;Darren Wiens&lt;/A&gt;'​ code is accessing the values in the nested or inner tuple by nesting or chaining multiple indexes.&amp;nbsp; With your code, &lt;SPAN style="font-family: courier new,courier;"&gt;row[2]&lt;/SPAN&gt; is retrieving the third element of the tuple returned by the search cursor, which happens to be the tuple containing x,y coordinates.&amp;nbsp; &lt;SPAN style="font-family: courier new,courier;"&gt;row[2][0]&lt;/SPAN&gt; is the first element of that SHAPE@XY tuple, the x coordinate, and &lt;SPAN style="font-family: courier new,courier;"&gt;row[2][1]&lt;/SPAN&gt; is the second element of that tuple, the y coordinate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since tuples are sequences, you could also use sequence unpacking if you think it would make the code more readable.&amp;nbsp; For example, lines 09-11 could be replaced with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;with arcpy.da.SearchCursor(point,['POINT_X','POINT_Y','SHAPE@XY']) as cursor:&amp;nbsp; 
&amp;nbsp;&amp;nbsp; for pt_x, pt_y, xy in cursor:&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; insCursor.insertRow([xy[0], xy[1], xy]) &lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now that I write it, something seems off, but I think it may be redundant information.&amp;nbsp; That is,&amp;nbsp; 'POINT_X' and 'POINT_Y' are being retrieved in the search cursor but not being used.&amp;nbsp; Anyhow, my point was to point out sequence unpacking and not what the code is doing or not doing (double pun not intended).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:51:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262283#M20160</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-11T12:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: populate x,y</title>
      <link>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262284#M20161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks Joshua so if there were more fields then just the x,y what would be the syntax ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;([row[&lt;SPAN class="number"&gt;2][&lt;SPAN class="number"&gt;0&lt;/SPAN&gt;],row[&lt;SPAN class="number"&gt;2&lt;/SPAN&gt;][&lt;SPAN class="number"&gt;1&lt;/SPAN&gt;],row[&lt;SPAN class="number"&gt;2&lt;/SPAN&gt;]],&lt;/SPAN&gt;[row[3][0],row[3]])?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2015 20:48:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262284#M20161</guid>
      <dc:creator>PacoAlverez</dc:creator>
      <dc:date>2015-08-06T20:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: populate x,y</title>
      <link>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262285#M20162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you list 3 fields when you create the insert cursor, then you need to fill it with 3 appropriate things when you insert a row. If you list 100 fields when you create the insert cursor, then you need to fill it with 100 appropriate things when you insert a row.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2015 21:04:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262285#M20162</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2015-08-06T21:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: populate x,y</title>
      <link>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262286#M20163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;so if i had two more fields would this be correct?&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;insCursor = arcpy.da.InsertCursor(pointFC, ['Minrights', 'FCVTotal','POINT_X','POINT_Y','SHAPE@XY']) # create insert cursor&amp;nbsp; 


&amp;nbsp;&amp;nbsp;&amp;nbsp; with arcpy.da.SearchCursor(point,['Minrights', 'FCVTotal','POINT_X','POINT_Y','SHAPE@XY']) as cursor: # loop through feature set&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.Minrights = row[0]&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; row.FCVTotal = row[1]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.POINT_X = row[2]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.POINT_Y = row[3]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; insCursor.insertRow(row) &lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:51:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262286#M20163</guid>
      <dc:creator>PacoAlverez</dc:creator>
      <dc:date>2021-12-11T12:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: populate x,y</title>
      <link>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262287#M20164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure exactly what you're trying to do inside the search cursor, but 'row' (from the search cursor) is already the 5-part list that will populate your insert cursor. Because you've set up the insert cursor fields and search cursor fields exactly the same, you can slide the 'row' from the search cursor right into the insert cursor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doesn't this work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;insCursor = arcpy.da.InsertCursor(pointFC, [&lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;'Minrights', 'FCVTotal','POINT_X','POINT_Y','SHAPE@XY'&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="comment" style="font-weight: inherit; font-style: inherit; color: #008200; font-size: 9pt !important; background-color: inherit;"&gt;# create insert cursor&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;

&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;with arcpy.da.SearchCursor(point,[&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;'Minrights', 'FCVTotal','POINT_X','POINT_Y','SHAPE@XY'&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;]) as cursor: &lt;/SPAN&gt;&lt;SPAN class="comment" style="font-weight: inherit; font-style: inherit; color: #008200; font-size: 9pt !important; background-color: inherit;"&gt;# loop through feature set&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;for&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; row &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; cursor: &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; insCursor.insertRow(row) &lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:51:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262287#M20164</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2021-12-11T12:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: populate x,y</title>
      <link>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262288#M20165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;no it does not work, i does create a point but nothing is populated not Point_X or Point_y and i don't get an error. I had this in the beginning but it wasn't working so i thought of listing the row = [0], row = [1]under the arcpy.da.SearchCursor()&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2015 22:38:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262288#M20165</guid>
      <dc:creator>PacoAlverez</dc:creator>
      <dc:date>2015-08-06T22:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: populate x,y</title>
      <link>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262289#M20166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay, last reply, then you're going to have to piece some of this together on your own.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;insCursor = arcpy.da.InsertCursor(pointFC, [&lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;'Minrights', 'FCVTotal','POINT_X','POINT_Y','SHAPE@XY'&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="comment" style="font-weight: inherit; font-style: inherit; color: #008200; font-size: 9pt !important; background-color: inherit;"&gt;# create insert cursor&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;with arcpy.da.SearchCursor(point,[&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;'Minrights', 'FCVTotal','POINT_X','POINT_Y','SHAPE@XY'&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;]) as cursor: &lt;/SPAN&gt;&lt;SPAN class="comment" style="font-weight: inherit; font-style: inherit; color: #008200; font-size: 9pt !important; background-color: inherit;"&gt;# loop through feature set&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;for&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; row &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; cursor:&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="background-color: inherit; color: black; font-weight: inherit; font-size: 9pt !important; font-style: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[0] = row[0] # if the 'Minrights' value is coming from the search cursor, otherwise change this&lt;/SPAN&gt;
&lt;SPAN style="background-color: inherit; color: black; font-weight: inherit; font-size: 9pt !important; font-style: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[1] = row[1] # if &lt;SPAN style="color: #000000; font-size: 12px;"&gt;the 'FCVTotal' value is coming from the search cursor, otherwise change this&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="background-color: inherit; color: #000000; font-weight: inherit; font-size: 12px; font-style: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[2] = row[4][0] # the X coordinate from the SHAPE@XY&lt;/SPAN&gt;
&lt;SPAN style="background-color: inherit; color: #000000; font-weight: inherit; font-size: 12px; font-style: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[3] = row[4][1] # the Y coordinate from the SHAPE@XY&lt;/SPAN&gt;
&lt;SPAN style="background-color: inherit; color: #000000; font-weight: inherit; font-size: 12px; font-style: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[4] = row[4] # the whole SHAPE@XY&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; insCursor.insertRow(row)&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:51:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262289#M20166</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2021-12-11T12:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: populate x,y</title>
      <link>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262290#M20167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Darren. thank you for your time and responses. i apologize for my python skills are not so great.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2015 22:57:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262290#M20167</guid>
      <dc:creator>PacoAlverez</dc:creator>
      <dc:date>2015-08-06T22:57:30Z</dc:date>
    </item>
    <item>
      <title>Re: populate x,y</title>
      <link>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262291#M20168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are &lt;SPAN style="font-family: courier new,courier;"&gt;POINT_X&lt;/SPAN&gt; and &lt;SPAN style="font-family: courier new,courier;"&gt;POINT_Y&lt;/SPAN&gt; populated in &lt;SPAN style="font-family: courier new,courier;"&gt;point&lt;/SPAN&gt; or are they going to be new data in &lt;SPAN style="font-family: courier new,courier;"&gt;pointFC&lt;/SPAN&gt;?&amp;nbsp; If they are NULL in &lt;SPAN style="font-family: courier new,courier;"&gt;point&lt;/SPAN&gt;, why are you retrieving them with the search cursor?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In cases like this, posting some sample data and an explanation of what you are trying to accomplish is helpful.&amp;nbsp; It could be your entire approach is off, and people in GeoNet could offer a different way of doing it entirely.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2015 14:44:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262291#M20168</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2015-08-12T14:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: populate x,y</title>
      <link>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262292#M20169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since Arcpy Data Access search cursors return tuples, this specific code will generate a TypeError since tuples don't support item assignment.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2015 14:46:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262292#M20169</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2015-08-12T14:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: populate x,y</title>
      <link>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262293#M20170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joshua. I was trying to understand how to create a point or multiple points and how those new points attributes populated from the parcel the new points are within. The x,y would be calculated at the time the new point or points are created.&amp;nbsp; I am rather new to python so my first posted code was based on information i found.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2015 16:25:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262293#M20170</guid>
      <dc:creator>PacoAlverez</dc:creator>
      <dc:date>2015-08-12T16:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: populate x,y</title>
      <link>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262294#M20171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unless you are willing/able to post a subset of the data and a description of what the final product would look like, I am out of ideas.&amp;nbsp; Best of luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2015 01:44:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262294#M20171</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2015-08-13T01:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: populate x,y</title>
      <link>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262295#M20172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is some data. thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2015 16:14:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262295#M20172</guid>
      <dc:creator>PacoAlverez</dc:creator>
      <dc:date>2015-08-13T16:14:41Z</dc:date>
    </item>
    <item>
      <title>Re: populate x,y</title>
      <link>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262296#M20173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is &lt;SPAN style="font-family: courier new,courier;"&gt;point&lt;/SPAN&gt;, exactly?&amp;nbsp; Your code is&amp;nbsp; &lt;SPAN style="font-family: courier new,courier;"&gt;point = arcpy.GetParameterAsText(&lt;SPAN class="number"&gt;0&lt;/SPAN&gt;)&lt;/SPAN&gt;&amp;nbsp; # click , but I am unclear what is being returned.&amp;nbsp; Is &lt;SPAN style="font-family: courier new,courier;"&gt;point&lt;/SPAN&gt; supposed to be an ArcPy Point object or a set of coordinates for a location or a name to a feature class containing points?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding your original error message, just so you understand why you were getting that error, you were using the &lt;SPAN style="font-family: courier new,courier;"&gt;SHAPE@XY &lt;/SPAN&gt;token.&amp;nbsp; The &lt;SPAN style="font-family: courier new,courier;"&gt;SHAPE@XY&lt;/SPAN&gt; token returns a Python tuple of the x,y coordinates of the point, not an ArcPy Point object or PointGeometry object.&amp;nbsp; As such, there is no 'SHAPE' attribute so an AttributeError is generated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2015 22:44:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/populate-x-y/m-p/262296#M20173</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2015-08-13T22:44:41Z</dc:date>
    </item>
  </channel>
</rss>

