<?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: Updating Shape Field from Lat/Long Fields in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/updating-shape-field-from-lat-long-fields/m-p/161872#M12386</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Shoot, I had the script wrong. I needed the Shape as a parameter. This works. Thanks Dan.&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/391267_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Dec 2017 04:26:40 GMT</pubDate>
    <dc:creator>JoelThomas</dc:creator>
    <dc:date>2017-12-20T04:26:40Z</dc:date>
    <item>
      <title>Updating Shape Field from Lat/Long Fields</title>
      <link>https://community.esri.com/t5/python-questions/updating-shape-field-from-lat-long-fields/m-p/161868#M12382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to update the SHAPE field of some points by using field calculator to update the SHAPE field based on X, Y fields in the attribute table. Can this be done? I'm trying the below calculation, and the points are changing location, but not to a location that is near either the X, Y fields I'm asking it to. I'm not sure where I'm going wrong here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/391262_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Dec 2017 03:31:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updating-shape-field-from-lat-long-fields/m-p/161868#M12382</guid>
      <dc:creator>JoelThomas</dc:creator>
      <dc:date>2017-12-20T03:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: Updating Shape Field from Lat/Long Fields</title>
      <link>https://community.esri.com/t5/python-questions/updating-shape-field-from-lat-long-fields/m-p/161869#M12383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;some sample values might help... if they are supposed to be in longitude and latitude, make sure longitude is the X and latitude is the Y (a common error) and in the western hemisphere, longitude is negative..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Dec 2017 03:36:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updating-shape-field-from-lat-long-fields/m-p/161869#M12383</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-12-20T03:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: Updating Shape Field from Lat/Long Fields</title>
      <link>https://community.esri.com/t5/python-questions/updating-shape-field-from-lat-long-fields/m-p/161870#M12384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dan, &lt;/P&gt;&lt;P&gt;Here are my values I'm trying to put in the shape field.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/391265_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But after I run the calc, and then pull the values out of the shape field, they resemble nothing of the X, Y fields. It changes it to the following. I don't get it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-2 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/391266_Capture2.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Dec 2017 03:53:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updating-shape-field-from-lat-long-fields/m-p/161870#M12384</guid>
      <dc:creator>JoelThomas</dc:creator>
      <dc:date>2017-12-20T03:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: Updating Shape Field from Lat/Long Fields</title>
      <link>https://community.esri.com/t5/python-questions/updating-shape-field-from-lat-long-fields/m-p/161871#M12385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would suggest adding the table to arcmap as an &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/make-xy-event-layer.htm"&gt;&lt;STRONG&gt;event layer&lt;/STRONG&gt;&lt;/A&gt; then save/export it as a shapefile or featureclass in a geodatabase... there is no point messing with the shapefile since something is amiss.&amp;nbsp; You will have all your attributes and the file will be clean.&amp;nbsp; As shown the top field does have the correct X and Y values with Longitude in the -121 and lat at 42.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Dec 2017 04:08:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updating-shape-field-from-lat-long-fields/m-p/161871#M12385</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-12-20T04:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: Updating Shape Field from Lat/Long Fields</title>
      <link>https://community.esri.com/t5/python-questions/updating-shape-field-from-lat-long-fields/m-p/161872#M12386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Shoot, I had the script wrong. I needed the Shape as a parameter. This works. Thanks Dan.&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/391267_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Dec 2017 04:26:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updating-shape-field-from-lat-long-fields/m-p/161872#M12386</guid>
      <dc:creator>JoelThomas</dc:creator>
      <dc:date>2017-12-20T04:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: Updating Shape Field from Lat/Long Fields</title>
      <link>https://community.esri.com/t5/python-questions/updating-shape-field-from-lat-long-fields/m-p/161873#M12387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In ArcGIS, Shape* is a system-managed field that is used to store the Geometry-type of the Features. It is Read-only, and you cannot edit it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Dec 2017 09:23:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updating-shape-field-from-lat-long-fields/m-p/161873#M12387</guid>
      <dc:creator>JayantaPoddar</dc:creator>
      <dc:date>2017-12-20T09:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: Updating Shape Field from Lat/Long Fields</title>
      <link>https://community.esri.com/t5/python-questions/updating-shape-field-from-lat-long-fields/m-p/161874#M12388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The actual reason why the calculation wasn't working is since you return a &lt;STRONG&gt;Point&lt;/STRONG&gt; object when the geometry is in fact a &lt;STRONG&gt;PointGeometry&lt;/STRONG&gt;.object.&amp;nbsp; See the field calculator expression below:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/391299_pastedImage_3.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you create a point object with the new X and Y and then use the point object to create the point geometry.. What you did in your second example is&amp;nbsp;providing the point geometry to the function and modify the point X and Y properties using the first part, and returning the point geometry object again&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CC&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/62883"&gt;Jayanta Poddar&lt;/A&gt;&amp;nbsp;, it is possible to modify the geometry using the field calculator as the result below shows. The red dots were moved with&amp;nbsp;coordinates from my X and Y fields:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/391291_pastedImage_1.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Dec 2017 12:33:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updating-shape-field-from-lat-long-fields/m-p/161874#M12388</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2017-12-20T12:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: Updating Shape Field from Lat/Long Fields</title>
      <link>https://community.esri.com/t5/python-questions/updating-shape-field-from-lat-long-fields/m-p/161875#M12389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rethinking it I realize that you don't have to specify the spatial reference, since the&amp;nbsp;featureclass already has this defined. You could use this to make thing more simple:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/391300_pastedImage_1.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Dec 2017 12:38:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updating-shape-field-from-lat-long-fields/m-p/161875#M12389</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2017-12-20T12:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: Updating Shape Field from Lat/Long Fields</title>
      <link>https://community.esri.com/t5/python-questions/updating-shape-field-from-lat-long-fields/m-p/1111298#M62786</link>
      <description>&lt;P&gt;I'm using ArcPro, and the Python might be different. Can you tell me why my code isn't working, please?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MichelleWilliamsERM_0-1635263295014.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/26214i777DDAEAB24A8DAF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MichelleWilliamsERM_0-1635263295014.png" alt="MichelleWilliamsERM_0-1635263295014.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 15:49:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updating-shape-field-from-lat-long-fields/m-p/1111298#M62786</guid>
      <dc:creator>MichelleWilliamsERM</dc:creator>
      <dc:date>2021-10-26T15:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: Updating Shape Field from Lat/Long Fields</title>
      <link>https://community.esri.com/t5/python-questions/updating-shape-field-from-lat-long-fields/m-p/1111328#M62789</link>
      <description>&lt;P&gt;The function parameters in the code block should not have exclamation marks, that's only for the field names in the expression. Get rid of all &lt;FONT face="courier new,courier"&gt;!&lt;/FONT&gt; characters in the code block.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 16:41:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updating-shape-field-from-lat-long-fields/m-p/1111328#M62789</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2021-10-26T16:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: Updating Shape Field from Lat/Long Fields</title>
      <link>https://community.esri.com/t5/python-questions/updating-shape-field-from-lat-long-fields/m-p/1312084#M68249</link>
      <description>&lt;P&gt;Got it working! This will be a huge time saver for shifting assets.&amp;nbsp; Thank you everyone.&lt;/P&gt;&lt;P&gt;Adding a screenshot of my code updated for ArcGIS Pro 2.9.5&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RyanBohan_0-1690387582096.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/76374i1BCDF6AA77DAAEEA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RyanBohan_0-1690387582096.png" alt="RyanBohan_0-1690387582096.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2023 16:06:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updating-shape-field-from-lat-long-fields/m-p/1312084#M68249</guid>
      <dc:creator>RyanBohan</dc:creator>
      <dc:date>2023-07-26T16:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: Updating Shape Field from Lat/Long Fields</title>
      <link>https://community.esri.com/t5/python-questions/updating-shape-field-from-lat-long-fields/m-p/1347461#M69197</link>
      <description>&lt;P&gt;Thanks for the help, I got this to work for me!&lt;/P&gt;&lt;P&gt;This does not seem to work if you have "Enable Undo" enabled. It worked great once I turned that off.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2023 22:14:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updating-shape-field-from-lat-long-fields/m-p/1347461#M69197</guid>
      <dc:creator>TomReyes</dc:creator>
      <dc:date>2023-11-08T22:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Updating Shape Field from Lat/Long Fields</title>
      <link>https://community.esri.com/t5/python-questions/updating-shape-field-from-lat-long-fields/m-p/1380558#M69830</link>
      <description>&lt;P&gt;This code made my feature disappear from the map. It succeeded to run but don't know why it disappeared.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2024 19:44:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updating-shape-field-from-lat-long-fields/m-p/1380558#M69830</guid>
      <dc:creator>Krocha</dc:creator>
      <dc:date>2024-02-09T19:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: Updating Shape Field from Lat/Long Fields</title>
      <link>https://community.esri.com/t5/python-questions/updating-shape-field-from-lat-long-fields/m-p/1488007#M70768</link>
      <description>&lt;P&gt;Thanks a lot! This was exactly what I needed to adjust my 2,600 points.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2024 04:28:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updating-shape-field-from-lat-long-fields/m-p/1488007#M70768</guid>
      <dc:creator>Alex_Zhuk</dc:creator>
      <dc:date>2024-06-10T04:28:26Z</dc:date>
    </item>
  </channel>
</rss>

