<?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: Move point features based on XY values in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/move-point-features-based-on-xy-values/m-p/715047#M55496</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Price,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have my hands tied on that option unfortunately.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The feature class is hosted in an ArcSDE gbd and I do not have the administrator access. It also requires quite a bit of effort (and $$) to make the changes. &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For now before a solution can be found, I have to stick to manual shifting by eye-balling and snapping the points together.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 May 2015 03:58:44 GMT</pubDate>
    <dc:creator>SiyangTeo</dc:creator>
    <dc:date>2015-05-07T03:58:44Z</dc:date>
    <item>
      <title>Move point features based on XY values</title>
      <link>https://community.esri.com/t5/python-questions/move-point-features-based-on-xy-values/m-p/715045#M55494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have posted this question &lt;A _jive_internal="true" href="https://community.esri.com/thread/115192" target="_blank"&gt;previously&lt;/A&gt;, but was unable to obtain a definite reply. Hence I am re-posting it once more.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to move a set of features based on the XY values from another table linked through table join.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found a field calculator script (see below), but it was not perfect. This is because the this script can only work if the XY values are within the same table. It does not work with a table join.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help to tweak this script or propose an alternative?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;def pointMove(shape,x_value,y_value):
&amp;nbsp;&amp;nbsp; point = shape.getPart(0)
&amp;nbsp;&amp;nbsp; point.X = x_value
&amp;nbsp;&amp;nbsp; point.Y = y_value
&amp;nbsp;&amp;nbsp; return point

__esri_field_calculator_splitter__
pointMove( !Shape!, !X!, !Y! )&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using ArcGIS Desktop 10.2.2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Siyang&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:37:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/move-point-features-based-on-xy-values/m-p/715045#M55494</guid>
      <dc:creator>SiyangTeo</dc:creator>
      <dc:date>2021-12-12T06:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: Move point features based on XY values</title>
      <link>https://community.esri.com/t5/python-questions/move-point-features-based-on-xy-values/m-p/715046#M55495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry your thread got abandoned. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not where I can test workarounds.... but I think the easiest solution would be to copy the XY fields to the local table using the Join Field tool, do the XY move, and then delete them when you're done if you don't need them.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 May 2015 03:28:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/move-point-features-based-on-xy-values/m-p/715046#M55495</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2015-05-07T03:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: Move point features based on XY values</title>
      <link>https://community.esri.com/t5/python-questions/move-point-features-based-on-xy-values/m-p/715047#M55496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Price,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have my hands tied on that option unfortunately.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The feature class is hosted in an ArcSDE gbd and I do not have the administrator access. It also requires quite a bit of effort (and $$) to make the changes. &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For now before a solution can be found, I have to stick to manual shifting by eye-balling and snapping the points together.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 May 2015 03:58:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/move-point-features-based-on-xy-values/m-p/715047#M55496</guid>
      <dc:creator>SiyangTeo</dc:creator>
      <dc:date>2015-05-07T03:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: Move point features based on XY values</title>
      <link>https://community.esri.com/t5/python-questions/move-point-features-based-on-xy-values/m-p/715048#M55497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After playing around with some arcpy, I managed to overcome the limitation of the field calculator by using this stand alone Python script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy

#input path of gdb where original feature class resides
gdb = "C:\Users\XXX\Test.gdb"
#input original feature class path with outdated XY
basefc = "C:\Users\XXX\Test.gdb\featureclass_old"
#input feature class path of points with updated XY
newfc = "C:\Users\XXX\Test.gdb\featureclass_new"
#input field name which has a unique ID to both original and new point feature class
field = "fieldname"

list_idxy = []


with arcpy.da.SearchCursor(newfc, [field, "SHAPE@X", "SHAPE@Y"]) as cur:
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in cur:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; list_idxy.append(row)



i = 0


with arcpy.da.Editor(gdb) as edit:
&amp;nbsp;&amp;nbsp;&amp;nbsp; with arcpy.da.UpdateCursor(basefc, [field, "SHAPE@X", "SHAPE@Y"]) as cur:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in cur:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print row
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if row[0] == list_idxy&lt;I&gt;[0]:&lt;/I&gt;
&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[1] = list_idxy&lt;I&gt;[1]&lt;/I&gt;
&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[2] = list_idxy&lt;I&gt;[2]&lt;/I&gt;
&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; i += 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;&amp;nbsp;&amp;nbsp; cur.updateRow(row)


print "points shifted!"






&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:37:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/move-point-features-based-on-xy-values/m-p/715048#M55497</guid>
      <dc:creator>SiyangTeo</dc:creator>
      <dc:date>2021-12-12T06:37:15Z</dc:date>
    </item>
  </channel>
</rss>

