<?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: How add correct coordinates to map in wgs 1984? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-add-correct-coordinates-to-map-in-wgs-1984/m-p/1049812#M60859</link>
    <description>&lt;P&gt;I changed to using Arcade so that the lat/longs are always up to date.&amp;nbsp; No one remembers to change them when they move a point.&amp;nbsp; Works great in a web map or ArcPro.&lt;/P&gt;&lt;P&gt;Another option if using SDE is Attribute Rules so that they autoupdate.&lt;/P&gt;&lt;P&gt;WGS 84 in Arcade&lt;/P&gt;&lt;P&gt;CurrentLat&lt;BR /&gt;var originShift = 2.0 * PI * 6378137.0 / 2.0;&lt;BR /&gt;var lon = (Geometry($feature).x / originShift) * 180.0;&lt;BR /&gt;var lat = (Geometry($feature).y / originShift) * 180.0;&lt;/P&gt;&lt;P&gt;lat = 180.0 / PI * (2.0 * Atan( Exp( lat * PI / 180.0)) - PI / 2.0);&lt;/P&gt;&lt;P&gt;return lat;&lt;/P&gt;&lt;P&gt;CurrentLong&lt;BR /&gt;var originShift = 2.0 * PI * 6378137.0 / 2.0;&lt;BR /&gt;var lon = (Geometry($feature).x / originShift) * 180.0;&lt;BR /&gt;var lat = (Geometry($feature).y / originShift) * 180.0;&lt;/P&gt;&lt;P&gt;lat = 180.0 / PI * (2.0 * Atan( Exp( lat * PI / 180.0)) - PI / 2.0);&lt;/P&gt;&lt;P&gt;return lon;&lt;/P&gt;&lt;P&gt;Make sure to config the popup to show 8 decimals.&lt;/P&gt;&lt;P&gt;Hope that helps.&amp;nbsp; I know not what you asked but it may work for you.&lt;/P&gt;</description>
    <pubDate>Wed, 21 Apr 2021 20:22:29 GMT</pubDate>
    <dc:creator>DougBrowning</dc:creator>
    <dc:date>2021-04-21T20:22:29Z</dc:date>
    <item>
      <title>How add correct coordinates to map in wgs 1984?</title>
      <link>https://community.esri.com/t5/python-questions/how-add-correct-coordinates-to-map-in-wgs-1984/m-p/1048409#M60830</link>
      <description>&lt;PRE&gt;xy = (&lt;SPAN class="hljs-number"&gt;47.550976&lt;/SPAN&gt;, &lt;SPAN class="hljs-number"&gt;42.963041&lt;/SPAN&gt;)

array = arcpy.Array()
&lt;SPAN class="hljs-keyword"&gt;with&lt;/SPAN&gt; arcpy.da.InsertCursor(schetchiki_path,[&lt;SPAN class="hljs-string"&gt;'SHAPE@XY'&lt;/SPAN&gt;, &lt;SPAN class="hljs-string"&gt;'Name'&lt;/SPAN&gt;]) &lt;SPAN class="hljs-keyword"&gt;as&lt;/SPAN&gt; c:
    c.insertRow([xy,name])&lt;/PRE&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="d9yQZ" style="width: 447px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/11160iFFB545ACE0BA8104/image-size/large?v=v2&amp;amp;px=999" role="button" title="d9yQZ" alt="d9yQZ" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Apr 2021 06:58:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-add-correct-coordinates-to-map-in-wgs-1984/m-p/1048409#M60830</guid>
      <dc:creator>Radzhabad</dc:creator>
      <dc:date>2021-04-17T06:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: How add correct coordinates to map in wgs 1984?</title>
      <link>https://community.esri.com/t5/python-questions/how-add-correct-coordinates-to-map-in-wgs-1984/m-p/1048422#M60835</link>
      <description>&lt;P&gt;That must be a partial script because whatever you are trying to do might just add a value to the Shape field but it won't do anything for the fields you have shown in your example&lt;/P&gt;</description>
      <pubDate>Sat, 17 Apr 2021 09:43:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-add-correct-coordinates-to-map-in-wgs-1984/m-p/1048422#M60835</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-04-17T09:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: How add correct coordinates to map in wgs 1984?</title>
      <link>https://community.esri.com/t5/python-questions/how-add-correct-coordinates-to-map-in-wgs-1984/m-p/1048493#M60838</link>
      <description>&lt;P&gt;See in the help for python examples: &lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/get-started/writing-geometries.htm" target="_self"&gt;Write geometries&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Or (MUCH easier!) create a table with your xy values in it and use the XY Table To Point, or Make XY Event Layer tools to create your points.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Apr 2021 04:07:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-add-correct-coordinates-to-map-in-wgs-1984/m-p/1048493#M60838</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-04-18T04:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: How add correct coordinates to map in wgs 1984?</title>
      <link>https://community.esri.com/t5/python-questions/how-add-correct-coordinates-to-map-in-wgs-1984/m-p/1049812#M60859</link>
      <description>&lt;P&gt;I changed to using Arcade so that the lat/longs are always up to date.&amp;nbsp; No one remembers to change them when they move a point.&amp;nbsp; Works great in a web map or ArcPro.&lt;/P&gt;&lt;P&gt;Another option if using SDE is Attribute Rules so that they autoupdate.&lt;/P&gt;&lt;P&gt;WGS 84 in Arcade&lt;/P&gt;&lt;P&gt;CurrentLat&lt;BR /&gt;var originShift = 2.0 * PI * 6378137.0 / 2.0;&lt;BR /&gt;var lon = (Geometry($feature).x / originShift) * 180.0;&lt;BR /&gt;var lat = (Geometry($feature).y / originShift) * 180.0;&lt;/P&gt;&lt;P&gt;lat = 180.0 / PI * (2.0 * Atan( Exp( lat * PI / 180.0)) - PI / 2.0);&lt;/P&gt;&lt;P&gt;return lat;&lt;/P&gt;&lt;P&gt;CurrentLong&lt;BR /&gt;var originShift = 2.0 * PI * 6378137.0 / 2.0;&lt;BR /&gt;var lon = (Geometry($feature).x / originShift) * 180.0;&lt;BR /&gt;var lat = (Geometry($feature).y / originShift) * 180.0;&lt;/P&gt;&lt;P&gt;lat = 180.0 / PI * (2.0 * Atan( Exp( lat * PI / 180.0)) - PI / 2.0);&lt;/P&gt;&lt;P&gt;return lon;&lt;/P&gt;&lt;P&gt;Make sure to config the popup to show 8 decimals.&lt;/P&gt;&lt;P&gt;Hope that helps.&amp;nbsp; I know not what you asked but it may work for you.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 20:22:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-add-correct-coordinates-to-map-in-wgs-1984/m-p/1049812#M60859</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2021-04-21T20:22:29Z</dc:date>
    </item>
  </channel>
</rss>

