<?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: Can't change points from attribute in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/can-t-change-points-from-attribute/m-p/176043#M13540</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't have to create a point or anything?&lt;/P&gt;&lt;P&gt;Like any of this...&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;pnt &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Point&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;xy&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
pnt_geometry &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;PointGeometry&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;pnt&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 09:04:35 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2021-12-11T09:04:35Z</dc:date>
    <item>
      <title>Can't change points from attribute</title>
      <link>https://community.esri.com/t5/python-questions/can-t-change-points-from-attribute/m-p/176036#M13533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI all - Currently I'm getting:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Runtime error &lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;&amp;nbsp; File "&amp;lt;string&amp;gt;", line 14, in &amp;lt;module&amp;gt;&lt;BR /&gt;AttributeError: 'module' object has no attribute 'updateCursor'&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;from the following code: &lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;# Move points based up current lat/lon&lt;BR /&gt;#grab stuff you need&lt;BR /&gt;import arcpy, os&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#filepath&lt;BR /&gt;filepath = r"C:\Users\joanna.grossman\AppData\Roaming\ESRI\Desktop10.4\ArcCatalog\AGR_SecureProd__AGR_Admin.sde"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#get feature class, feidds&lt;BR /&gt;fc = "GDB_AGR_SECURE.AGR_ADMIN.ApiariesWGS_20160927"&lt;BR /&gt;lat = "Latitude"&lt;BR /&gt;lon = "Longtitude"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#create curser on fc&lt;BR /&gt;cursor = arcpy.da.updateCursor(fc, ["SHAPE@XY"])&lt;BR /&gt;row = cursor.next()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#get points&lt;BR /&gt;pnt = arcpy.Point()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while row:&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;x = row.getValue(lon)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;y = row.getValue(lat)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;xy = (x,y)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;#pnt = arcpy.Point(xy)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;#pnt_geometry = arcpy.PointGeometry(pnt)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;print x&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;print xy&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;#print(pnt_geometry.getGeohash(6))&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;#row.shape = pnt &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;cursor.updateRow([xy])&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;row = cursor.next()&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I'm a total Python/arcpy noob. Would really appreciate your feedback. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2016 14:41:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/can-t-change-points-from-attribute/m-p/176036#M13533</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2016-11-17T14:41:55Z</dc:date>
    </item>
    <item>
      <title>Re: Can't change points from attribute</title>
      <link>https://community.esri.com/t5/python-questions/can-t-change-points-from-attribute/m-p/176037#M13534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Capitalize the 'u'. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cursor = arcpy.da.UpdateCursor(fc, ["field"])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2016 15:19:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/can-t-change-points-from-attribute/m-p/176037#M13534</guid>
      <dc:creator>MitchHolley1</dc:creator>
      <dc:date>2016-11-17T15:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: Can't change points from attribute</title>
      <link>https://community.esri.com/t5/python-questions/can-t-change-points-from-attribute/m-p/176038#M13535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think &lt;A href="https://community.esri.com/migrated-users/159379"&gt;Mitch Holley&lt;/A&gt;‌ has identified the issue causing the error you posted. Here's the documentation for &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-data-access/updatecursor-class.htm"&gt;UpdateCursor&lt;/A&gt;. However, I think you will have some additional issues with how you're using the UpdateCursor. Check out the code samples in the help documentation for some guidance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also,&amp;nbsp;&lt;A href="https://community.esri.com/docs/DOC-8691"&gt;Posting code with Syntax Highlighting on GeoNet&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2016 16:11:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/can-t-change-points-from-attribute/m-p/176038#M13535</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2016-11-17T16:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: Can't change points from attribute</title>
      <link>https://community.esri.com/t5/python-questions/can-t-change-points-from-attribute/m-p/176039#M13536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;wow. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2016 18:30:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/can-t-change-points-from-attribute/m-p/176039#M13536</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2016-11-17T18:30:54Z</dc:date>
    </item>
    <item>
      <title>Re: Can't change points from attribute</title>
      <link>https://community.esri.com/t5/python-questions/can-t-change-points-from-attribute/m-p/176040#M13537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Blake is spot on.&amp;nbsp; You are mixing the usage patterns of the old cursors and newer Data Access cursors.&amp;nbsp; Specifically, &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;getValue()&lt;/SPAN&gt; doesn't apply with the newer Data Access cursors.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2016 18:38:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/can-t-change-points-from-attribute/m-p/176040#M13537</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2016-11-17T18:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: Can't change points from attribute</title>
      <link>https://community.esri.com/t5/python-questions/can-t-change-points-from-attribute/m-p/176041#M13538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;okay. I'm learning things! So the way to get a value now is to grab it from a stack of fields?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2016 18:42:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/can-t-change-points-from-attribute/m-p/176041#M13538</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2016-11-17T18:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: Can't change points from attribute</title>
      <link>https://community.esri.com/t5/python-questions/can-t-change-points-from-attribute/m-p/176042#M13539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, if you're trying to update geometries based on a Lat and Long field. It would look something like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/265511_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2016 19:21:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/can-t-change-points-from-attribute/m-p/176042#M13539</guid>
      <dc:creator>MitchHolley1</dc:creator>
      <dc:date>2016-11-17T19:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: Can't change points from attribute</title>
      <link>https://community.esri.com/t5/python-questions/can-t-change-points-from-attribute/m-p/176043#M13540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't have to create a point or anything?&lt;/P&gt;&lt;P&gt;Like any of this...&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;pnt &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Point&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;xy&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
pnt_geometry &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;PointGeometry&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;pnt&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:04:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/can-t-change-points-from-attribute/m-p/176043#M13540</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T09:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: Can't change points from attribute</title>
      <link>https://community.esri.com/t5/python-questions/can-t-change-points-from-attribute/m-p/176044#M13541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I encourage you to read &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/analyze/python/data-access-using-cursors.htm"&gt;Accessing data using cursors&lt;/A&gt;.&amp;nbsp; Mitch is using "tokens" to access the spatial object.&amp;nbsp; The tokens are a form of shortcut/optimization that can be used to simplify working with geometry objects in data tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2016 19:31:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/can-t-change-points-from-attribute/m-p/176044#M13541</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2016-11-17T19:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: Can't change points from attribute</title>
      <link>https://community.esri.com/t5/python-questions/can-t-change-points-from-attribute/m-p/176045#M13542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;will do - thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2016 19:43:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/can-t-change-points-from-attribute/m-p/176045#M13542</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2016-11-17T19:43:57Z</dc:date>
    </item>
  </channel>
</rss>

