<?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 Coordinate calculation within script, coordinate system name error in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/coordinate-calculation-within-script-coordinate/m-p/1262731#M67873</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I have written a script and within it I try to calculate coordinate values based on WGS 1984 GCS. I wrote the below line:&lt;/P&gt;&lt;P&gt;arcpy.management.CalculateGeometryAttributes(points_name, ['Y', 'POINT_Y'], coordinate_system='WGS1984')&lt;/P&gt;&lt;P&gt;However, the name of the coordinate system is causing an error. Any suggestion what should the name be?&lt;/P&gt;</description>
    <pubDate>Tue, 28 Feb 2023 21:09:56 GMT</pubDate>
    <dc:creator>Seyed-MahdySadraddini</dc:creator>
    <dc:date>2023-02-28T21:09:56Z</dc:date>
    <item>
      <title>Coordinate calculation within script, coordinate system name error</title>
      <link>https://community.esri.com/t5/python-questions/coordinate-calculation-within-script-coordinate/m-p/1262731#M67873</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I have written a script and within it I try to calculate coordinate values based on WGS 1984 GCS. I wrote the below line:&lt;/P&gt;&lt;P&gt;arcpy.management.CalculateGeometryAttributes(points_name, ['Y', 'POINT_Y'], coordinate_system='WGS1984')&lt;/P&gt;&lt;P&gt;However, the name of the coordinate system is causing an error. Any suggestion what should the name be?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 21:09:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/coordinate-calculation-within-script-coordinate/m-p/1262731#M67873</guid>
      <dc:creator>Seyed-MahdySadraddini</dc:creator>
      <dc:date>2023-02-28T21:09:56Z</dc:date>
    </item>
    <item>
      <title>Re: Coordinate calculation within script, coordinate system name error</title>
      <link>https://community.esri.com/t5/python-questions/coordinate-calculation-within-script-coordinate/m-p/1262734#M67874</link>
      <description>&lt;P&gt;You probably need to use the WKID (Well Known ID) which for WGS 1984 GCS is&amp;nbsp;&lt;STRONG&gt;4326.&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;Well-Known ID&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;The&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Well-Known ID&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(WKID) is a unique number assigned to a coordinate system. You can find the WKID in the Coordinate Systems Details window. Once you know this number, it's a handy way to search for the coordinate system later.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 28 Feb 2023 21:14:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/coordinate-calculation-within-script-coordinate/m-p/1262734#M67874</guid>
      <dc:creator>JeffHanson2</dc:creator>
      <dc:date>2023-02-28T21:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: Coordinate calculation within script, coordinate system name error</title>
      <link>https://community.esri.com/t5/python-questions/coordinate-calculation-within-script-coordinate/m-p/1262762#M67875</link>
      <description>&lt;P&gt;This is one of the times I find the UI helpful.&amp;nbsp; Fire up pro, do the operation manually, open up the analysis tools history, copy the the function as a python snippet, paste that somewhere, copy out the correct string for the coordinate system, put that into your code.&lt;/P&gt;&lt;P&gt;Another option is if the script touches a feature layer with the desired coordinate system, the script can query out the coordinate system value, stash that into a variable and use the variable in the calculategeometry operation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 22:02:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/coordinate-calculation-within-script-coordinate/m-p/1262762#M67875</guid>
      <dc:creator>DavidAnderson_1701</dc:creator>
      <dc:date>2023-02-28T22:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: Coordinate calculation within script, coordinate system name error</title>
      <link>https://community.esri.com/t5/python-questions/coordinate-calculation-within-script-coordinate/m-p/1297104#M67877</link>
      <description>&lt;P&gt;Maybe add the space between WGS and 1984.&amp;nbsp; 'WGS 1984'&lt;/P&gt;&lt;P&gt;edited to add using the spatial reference object since the docs do not show it and the method might not cast it from the 'WGS 1984' string:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;sr = arcpy.SpatialReference('WGS 1984')

arcpy.management.CalculateGeometryAttributes(points_name, ['Y', 'POINT_Y'], coordinate_system=sr)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 14:24:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/coordinate-calculation-within-script-coordinate/m-p/1297104#M67877</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2023-06-08T14:24:00Z</dc:date>
    </item>
  </channel>
</rss>

