<?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: Attribute Rule- X and Y coordinates Decimal Degrees in Geodatabase Questions</title>
    <link>https://community.esri.com/t5/geodatabase-questions/attribute-rule-x-and-y-coordinates-decimal-degrees/m-p/1058178#M7181</link>
    <description>&lt;P&gt;If it's a new point, do you need the Centroid qualifier?&amp;nbsp; I'm just not familiar with that function.&lt;/P&gt;&lt;P&gt;But check out this post:&amp;nbsp;&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-pro-questions/using-arcade-to-calculate-xy-geometry/m-p/135271#M5826" target="_blank"&gt;https://community.esri.com/t5/arcgis-pro-questions/using-arcade-to-calculate-xy-geometry/m-p/135271#M5826&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 14 May 2021 20:26:43 GMT</pubDate>
    <dc:creator>JoeBorgione</dc:creator>
    <dc:date>2021-05-14T20:26:43Z</dc:date>
    <item>
      <title>Attribute Rule- X and Y coordinates Decimal Degrees</title>
      <link>https://community.esri.com/t5/geodatabase-questions/attribute-rule-x-and-y-coordinates-decimal-degrees/m-p/1057252#M7177</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have arcgis pro 2.7.2 and sde point feature class..using attribute rule for X and Y in decimal degrees (DD). I found two different scripts from geonet. Please see issues and screenshots below. Please advise. Thank you.&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Script #1&lt;/STRONG&gt; &lt;/U&gt;one field type text and 100 characters ATTRUBUTE RULE. nothing happen.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;var polyx = text(centroid($feature).x);
var polyy = text(centroid($feature).y);

function metersToLatLon(mx, my) {

   var originShift = 2.0 * PI * 6378137.0 / 2.0;

   var lon = (mx / originShift) * 180.0;

   var lat = (my / originShift) * 180.0;

   lat = 180.0 / PI * (2.0 * Atan(Exp(lat * PI / 180.0)) - PI / 2.0);
return [lat, lon];

}

var latlon = "";
var result = "";
var latlon = metersToLatLon(polyx, polyy);

result = Round(latlon[0], 6) + ', ' + Round(latlon[1], 6);


return result;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Script # 2&lt;/STRONG&gt; &lt;/U&gt;TWO fields x and y. DOUBLE(38, 8). It is populated but not the correct DD number.&lt;/P&gt;&lt;P&gt;it displays 7.1233 and 4.1234 something. But it is supposed to be -80 and 25 something.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;//Latitude

var y = Centroid($feature).y

var originShift = 2.0 * PI * 6378137.0 / 2.0;

var lat = (y / originShift) * 180.0;

lat = 180.0 / PI * (2.0 * Atan( Exp( lat * PI / 180.0)) - PI / 2.0);

return lat&lt;/LI-CODE&gt;&lt;LI-CODE lang="python"&gt;//Longitude

var x = Centroid($feature).x

var originShift = 2.0 * PI * 6378137.0 / 2.0;

var lon = (x / originShift) * 180.0;

return lon&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But then I tried to add &lt;STRONG&gt;calculate geometry tool &lt;/STRONG&gt;and &lt;STRONG&gt;add geometry attribute tool&lt;/STRONG&gt; manual. I got both same error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlexP__0-1620838797860.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/13179i637416D5EF5C2C54/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AlexP__0-1620838797860.png" alt="AlexP__0-1620838797860.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2021 19:57:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/attribute-rule-x-and-y-coordinates-decimal-degrees/m-p/1057252#M7177</guid>
      <dc:creator>AlexP_</dc:creator>
      <dc:date>2021-05-14T19:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rule- X and Y coordinates Decimal Degrees</title>
      <link>https://community.esri.com/t5/geodatabase-questions/attribute-rule-x-and-y-coordinates-decimal-degrees/m-p/1058163#M7179</link>
      <description>&lt;P&gt;I don't know why you are doing all the equations.&amp;nbsp; What is the purpose of the address rule?&amp;nbsp; Are you creating a new point and you want to trigger the rule then and calculate the xy?&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2021 20:09:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/attribute-rule-x-and-y-coordinates-decimal-degrees/m-p/1058163#M7179</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2021-05-14T20:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rule- X and Y coordinates Decimal Degrees</title>
      <link>https://community.esri.com/t5/geodatabase-questions/attribute-rule-x-and-y-coordinates-decimal-degrees/m-p/1058170#M7180</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; I am trying to find a script that is working but it is not as expected. This is for an user create a new point, it should populate x and y fields in decimal degree.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2021 20:15:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/attribute-rule-x-and-y-coordinates-decimal-degrees/m-p/1058170#M7180</guid>
      <dc:creator>AlexP_</dc:creator>
      <dc:date>2021-05-14T20:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rule- X and Y coordinates Decimal Degrees</title>
      <link>https://community.esri.com/t5/geodatabase-questions/attribute-rule-x-and-y-coordinates-decimal-degrees/m-p/1058178#M7181</link>
      <description>&lt;P&gt;If it's a new point, do you need the Centroid qualifier?&amp;nbsp; I'm just not familiar with that function.&lt;/P&gt;&lt;P&gt;But check out this post:&amp;nbsp;&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-pro-questions/using-arcade-to-calculate-xy-geometry/m-p/135271#M5826" target="_blank"&gt;https://community.esri.com/t5/arcgis-pro-questions/using-arcade-to-calculate-xy-geometry/m-p/135271#M5826&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2021 20:26:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/attribute-rule-x-and-y-coordinates-decimal-degrees/m-p/1058178#M7181</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2021-05-14T20:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rule- X and Y coordinates Decimal Degrees</title>
      <link>https://community.esri.com/t5/geodatabase-questions/attribute-rule-x-and-y-coordinates-decimal-degrees/m-p/1058182#M7182</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; I tested it but it returns in feet.&amp;nbsp; I tried to click their link as suggested , I already tested that same script #1 as I posted here. It returns blank.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result should be like this screenshot.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2021 21:18:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/attribute-rule-x-and-y-coordinates-decimal-degrees/m-p/1058182#M7182</guid>
      <dc:creator>AlexP_</dc:creator>
      <dc:date>2021-05-14T21:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rule- X and Y coordinates Decimal Degrees</title>
      <link>https://community.esri.com/t5/geodatabase-questions/attribute-rule-x-and-y-coordinates-decimal-degrees/m-p/1058187#M7183</link>
      <description>&lt;P&gt;So those calculations are from&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1108"&gt;@XanderBakker&lt;/a&gt;&amp;nbsp; that seem to come from this post:&amp;nbsp;&amp;nbsp;&lt;A href="https://community.esri.com/t5/developers-questions/lat-long-unit-conversion-with-arcade/m-p/207272?commentID=806053#comment-806053" target="_blank"&gt;https://community.esri.com/t5/developers-questions/lat-long-unit-conversion-with-arcade/m-p/207272?commentID=806053#comment-806053&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In his post he converts meters to Lat Lat Long, but are you trying to convert FEET to lat long?&amp;nbsp; I think the constant in that equation would need to be changed but I don't know what to.&amp;nbsp; He refers to&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.maptiler.org/google-maps-coordinates-tile-bounds-projection/" target="_blank"&gt;http://www.maptiler.org/google-maps-coordinates-tile-bounds-projection/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;So that might help you out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2021 20:49:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/attribute-rule-x-and-y-coordinates-decimal-degrees/m-p/1058187#M7183</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2021-05-14T20:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rule- X and Y coordinates Decimal Degrees</title>
      <link>https://community.esri.com/t5/geodatabase-questions/attribute-rule-x-and-y-coordinates-decimal-degrees/m-p/1058189#M7184</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;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1108"&gt;@XanderBakker&lt;/a&gt;&amp;nbsp; I think I looked at the wrong script. is there anyway to do it direct populate DD?&amp;nbsp; just like add XY coordinates tool with WGS 1984 in manually. the result is expected.. but lookin to apply that in attribute rule?&amp;nbsp; &amp;nbsp;point x and point y is gonna be blank when an user creates a point.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2021 20:54:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/attribute-rule-x-and-y-coordinates-decimal-degrees/m-p/1058189#M7184</guid>
      <dc:creator>AlexP_</dc:creator>
      <dc:date>2021-05-14T20:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rule- X and Y coordinates Decimal Degrees</title>
      <link>https://community.esri.com/t5/geodatabase-questions/attribute-rule-x-and-y-coordinates-decimal-degrees/m-p/1058190#M7185</link>
      <description>&lt;P&gt;As mentioned earlier, I'm not familiar with that function.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2021 20:57:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/attribute-rule-x-and-y-coordinates-decimal-degrees/m-p/1058190#M7185</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2021-05-14T20:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rule- X and Y coordinates Decimal Degrees</title>
      <link>https://community.esri.com/t5/geodatabase-questions/attribute-rule-x-and-y-coordinates-decimal-degrees/m-p/1058191#M7186</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, Joe. Hope someone or&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1108"&gt;@XanderBakker&lt;/a&gt;&amp;nbsp;might assist ..&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2021 20:58:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/attribute-rule-x-and-y-coordinates-decimal-degrees/m-p/1058191#M7186</guid>
      <dc:creator>AlexP_</dc:creator>
      <dc:date>2021-05-14T20:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rule- X and Y coordinates Decimal Degrees</title>
      <link>https://community.esri.com/t5/geodatabase-questions/attribute-rule-x-and-y-coordinates-decimal-degrees/m-p/1058195#M7187</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/181349"&gt;@AlexP_&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Attribute Rules use Arcade, as you already know, and currently, there is no support for projecting coordinates between coordinate systems in Arcade. The formulas you mentioned earlier only serve to translate Web Mercator Auxilliary Sphere to WGS1984. Only if you have the math to do this translation you will be able to do this using Arcade. That is the situation at this moment.&amp;nbsp;&lt;/P&gt;&lt;P&gt;You may want to think about using a programmed task that executes a script and fills the attributes with the DD values. Not sure when projections will be supported in Arcade. I have heard that REST calls will be supported in Arcade later on, and this would also solve this problem.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2021 21:13:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/attribute-rule-x-and-y-coordinates-decimal-degrees/m-p/1058195#M7187</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-05-14T21:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rule- X and Y coordinates Decimal Degrees</title>
      <link>https://community.esri.com/t5/geodatabase-questions/attribute-rule-x-and-y-coordinates-decimal-degrees/m-p/1322240#M8564</link>
      <description>&lt;P&gt;Was there an actual fix for this? I get the&amp;nbsp;&lt;STRONG&gt;Traceback&amp;nbsp;&lt;/STRONG&gt;issue as well, but my lines of code for py. are different. I figured if you had something then maybe I could look into it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2023 17:45:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/attribute-rule-x-and-y-coordinates-decimal-degrees/m-p/1322240#M8564</guid>
      <dc:creator>sjet1010</dc:creator>
      <dc:date>2023-08-24T17:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rule- X and Y coordinates Decimal Degrees</title>
      <link>https://community.esri.com/t5/geodatabase-questions/attribute-rule-x-and-y-coordinates-decimal-degrees/m-p/1627771#M9650</link>
      <description>&lt;P&gt;It is now 2025. I cannot believe Arcade, a GIS language cannot give us COORDINATES, which are the basis of all GIS layers, in a usable format?! Hoping Esri plan to fix this at some point.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jun 2025 14:17:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/attribute-rule-x-and-y-coordinates-decimal-degrees/m-p/1627771#M9650</guid>
      <dc:creator>Nicauldron</dc:creator>
      <dc:date>2025-06-27T14:17:55Z</dc:date>
    </item>
  </channel>
</rss>

