<?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: Calculate Point X Y  in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/calculate-point-x-y/m-p/366549#M28922</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use an Data Access Update Cursor to reproject the spatial data and then use the &lt;A href="mailto:SHAPE@XY"&gt;SHAPE@XY&lt;/A&gt; or &lt;A href="mailto:SHAPE@X"&gt;SHAPE@X&lt;/A&gt; and &lt;A href="mailto:SHAPE@Y"&gt;SHAPE@Y&lt;/A&gt; tokens to get the X,Y values and then update the new fields.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Jul 2019 21:57:17 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2019-07-08T21:57:17Z</dc:date>
    <item>
      <title>Calculate Point X Y</title>
      <link>https://community.esri.com/t5/python-questions/calculate-point-x-y/m-p/366548#M28921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got suckered into thinking Calculate Geometry Attributes available in 10.6.1 by &lt;A href="http://desktop.arcgis.com/en/arcmap/10.6/tools/data-management-toolbox/calculate-geometry-attributes.htm"&gt;believing the online help&lt;/A&gt;.&amp;nbsp; This post set me straight:&amp;nbsp;&amp;nbsp;&lt;A _jive_internal="true" href="https://community.esri.com/message/820951-calculate-geometry-attributes-tool"&gt;https://community.esri.com/message/820951-calculate-geometry-attributes-tool&lt;/A&gt;.&amp;nbsp; And no, ESRI has not updated the online help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, the question remains: is there a way to calculate the X and Y geometry values of a point?&amp;nbsp; I have a point feature class that's in State Plane coordinates, and I've added Lat/Long fields that I can manually calculate into GCS NAD 83 decimal degrees.&amp;nbsp; I'd like to perform this task in a stand alone script....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jul 2019 20:50:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculate-point-x-y/m-p/366548#M28921</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2019-07-08T20:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Point X Y</title>
      <link>https://community.esri.com/t5/python-questions/calculate-point-x-y/m-p/366549#M28922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use an Data Access Update Cursor to reproject the spatial data and then use the &lt;A href="mailto:SHAPE@XY"&gt;SHAPE@XY&lt;/A&gt; or &lt;A href="mailto:SHAPE@X"&gt;SHAPE@X&lt;/A&gt; and &lt;A href="mailto:SHAPE@Y"&gt;SHAPE@Y&lt;/A&gt; tokens to get the X,Y values and then update the new fields.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jul 2019 21:57:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculate-point-x-y/m-p/366549#M28922</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2019-07-08T21:57:17Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Point X Y</title>
      <link>https://community.esri.com/t5/python-questions/calculate-point-x-y/m-p/366550#M28923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I knew there had to be a way.&amp;nbsp; Thanks.&amp;nbsp; The new tool has a funky syntax, but I got it figured out:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;arcpy.env.outputCoordinateSystem = 4269  #GCS_North_American_1983
arcpy.CalculateGeometryAttributes_management(fc,[['Latitude','POINT_Y'],['Longitude','POINT_X']])&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;Where fc is my feature class and the two fields are named accordingly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:01:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculate-point-x-y/m-p/366550#M28923</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2021-12-11T17:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Point X Y</title>
      <link>https://community.esri.com/t5/python-questions/calculate-point-x-y/m-p/366551#M28924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/4422"&gt;Joe,&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you looking to do this for a single point or all points in a feature class? &amp;nbsp;If for a feature class you can use&amp;nbsp;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/10.6/tools/data-management-toolbox/add-xy-coordinates.htm" title="http://desktop.arcgis.com/en/arcmap/10.6/tools/data-management-toolbox/add-xy-coordinates.htm"&gt;Add XY Coordinates&lt;/A&gt;. &amp;nbsp;This will add or update the PointX and PointY fields to your feature class. &amp;nbsp;To do this for a different coordinate system than that of the feature class you need to set the output coordinate system and transformation in the environment settings when running the tool. &amp;nbsp;I use this all the time to add GCS decimal degrees to our state plane data for use in other applications. &amp;nbsp;I will add a few screen shots once I can get on a desktop system later this evening.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jul 2019 22:13:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculate-point-x-y/m-p/366551#M28924</guid>
      <dc:creator>LanceCole</dc:creator>
      <dc:date>2019-07-08T22:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Point X Y</title>
      <link>https://community.esri.com/t5/python-questions/calculate-point-x-y/m-p/366552#M28925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Lance; this particular script is more or less for maintenance of the point feature class.&amp;nbsp; The default coordinate system is&amp;nbsp; State Plane NAD 83 feet;&amp;nbsp; The two fields are added to the feature class since the field techs thin in Lat/Long, not feet.&amp;nbsp; The points get edited (moved) from time to time, so I just want to re-calculate them on a regular basis.&amp;nbsp;&amp;nbsp;Looking at the Add XY Coordinates link you provide, the field names have to be Point_X and Point_Y; once it's run initially, it can be run as a maintenance item I presume...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/67060"&gt;Lance Cole&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jul 2019 22:35:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculate-point-x-y/m-p/366552#M28925</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2019-07-08T22:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Point X Y</title>
      <link>https://community.esri.com/t5/python-questions/calculate-point-x-y/m-p/366553#M28926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/4422" target="_blank"&gt;Joe,&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are correct AddXY uses or will add&amp;nbsp;the Point_X and Point_Y attributes to your feature when run.&amp;nbsp;We use this when pushing out data to AGOL to add X and Y attributes to be consumed by other applications such as Collector or Survey123 that need lat/long in WGS 1984 decimal degrees for example.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;outputCoordinateSystem &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SpatialReference&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;4326&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;#WGS 84 &lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geographicTransformations &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"WGS_1984_(ITRF00)_To_NAD_1983"&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AddXY_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&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;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One other side note, do not forget about the transformation for projecting coordinate systems in addition to the coordinate system.&amp;nbsp; This can be added to your script using the &lt;STRONG&gt;arcpy.env.geographicTransforamtions&lt;/STRONG&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:01:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculate-point-x-y/m-p/366553#M28926</guid>
      <dc:creator>LanceCole</dc:creator>
      <dc:date>2021-12-11T17:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Point X Y</title>
      <link>https://community.esri.com/t5/python-questions/calculate-point-x-y/m-p/1057300#M61100</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/3374"&gt;@JoeBorgione&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1371"&gt;@JoshuaBixby&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/201429"&gt;@LanceCole&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to do this same result but&amp;nbsp; for attribute rule. Please kindly advise. Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 18:34:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculate-point-x-y/m-p/1057300#M61100</guid>
      <dc:creator>AlexP_</dc:creator>
      <dc:date>2021-05-12T18:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Point X Y</title>
      <link>https://community.esri.com/t5/python-questions/calculate-point-x-y/m-p/1057316#M61102</link>
      <description>&lt;P&gt;It appears that&lt;/P&gt;&lt;P&gt;Geometry($feature).x&amp;nbsp; and&lt;/P&gt;&lt;P&gt;Geometry(#feature).y&lt;/P&gt;&lt;P&gt;Should return what you want.&lt;/P&gt;&lt;P&gt;A quick google search of 'arcgis arcade return coordinates' got me going.&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 19:07:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculate-point-x-y/m-p/1057316#M61102</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2021-05-12T19:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Point X Y</title>
      <link>https://community.esri.com/t5/python-questions/calculate-point-x-y/m-p/1058160#M61127</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/3374"&gt;@JoeBorgione&lt;/a&gt;&amp;nbsp; Thank you. Yes, i did that as the following. I posted but no one has answer.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/geodatabase-questions/attribute-rule-x-and-y-coordinates-decimal-degrees/td-p/1057252" target="_blank"&gt;https://community.esri.com/t5/geodatabase-questions/attribute-rule-x-and-y-coordinates-decimal-degrees/td-p/1057252&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2021 20:00:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculate-point-x-y/m-p/1058160#M61127</guid>
      <dc:creator>AlexP_</dc:creator>
      <dc:date>2021-05-14T20:00:38Z</dc:date>
    </item>
  </channel>
</rss>

