<?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: Caluculate Centroid in WGS (DD) from Polygon Feature ((NAD_1983_UTM_Zone_15N) in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/caluculate-centroid-in-wgs-dd-from-polygon-feature/m-p/1338200#M68959</link>
    <description>&lt;P&gt;I would try Calculate Geometry Attributes, setting a coordinate system to DD.&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/3.0/tool-reference/data-management/calculate-geometry-attributes.htm" target="_blank" rel="noopener"&gt;https://pro.arcgis.com/en/pro-app/3.0/tool-reference/data-management/calculate-geometry-attributes.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can specify two new fields, specify the coordinate system, and the DD coordinate output format.&lt;/P&gt;&lt;P&gt;You will get your polygon feature class with the centroid fields added with the DD values.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Calc_geometry_attributes.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/83138i5B6C755459438227/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Calc_geometry_attributes.png" alt="Calc_geometry_attributes.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Calc_geometry_attributes_new_fields.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/83139iCB650D50058003F2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Calc_geometry_attributes_new_fields.png" alt="Calc_geometry_attributes_new_fields.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; In Python:&lt;/P&gt;&lt;P&gt;arcpy.management.CalculateGeometryAttributes(&lt;BR /&gt;in_features="Test",&lt;BR /&gt;geometry_property="X_coord CENTROID_X;Y_Coord CENTROID_Y",&lt;BR /&gt;length_unit="",&lt;BR /&gt;area_unit="",&lt;BR /&gt;coordinate_system='GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]',&lt;BR /&gt;coordinate_format="DD"&lt;BR /&gt;)&lt;/P&gt;</description>
    <pubDate>Mon, 16 Oct 2023 13:43:01 GMT</pubDate>
    <dc:creator>BobBooth1</dc:creator>
    <dc:date>2023-10-16T13:43:01Z</dc:date>
    <item>
      <title>Caluculate Centroid in WGS (DD) from Polygon Feature ((NAD_1983_UTM_Zone_15N)</title>
      <link>https://community.esri.com/t5/python-questions/caluculate-centroid-in-wgs-dd-from-polygon-feature/m-p/1338192#M68958</link>
      <description>&lt;P&gt;I was wondering, Is there any tool/ script to calculate the centroid point in&amp;nbsp; WGS (Latitude and Longitude) of the each polygon which are in &amp;nbsp;NAD_1983_UTM_Zone_15N projection system ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Suppose the point has below x,y and needs to convert in to Decimal degrees.&amp;nbsp;&lt;/P&gt;&lt;P&gt;X =1057502.154938&lt;/P&gt;&lt;P&gt;Y =11252250.240797&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 13:23:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/caluculate-centroid-in-wgs-dd-from-polygon-feature/m-p/1338192#M68958</guid>
      <dc:creator>vijaybadugu</dc:creator>
      <dc:date>2023-10-16T13:23:23Z</dc:date>
    </item>
    <item>
      <title>Re: Caluculate Centroid in WGS (DD) from Polygon Feature ((NAD_1983_UTM_Zone_15N)</title>
      <link>https://community.esri.com/t5/python-questions/caluculate-centroid-in-wgs-dd-from-polygon-feature/m-p/1338200#M68959</link>
      <description>&lt;P&gt;I would try Calculate Geometry Attributes, setting a coordinate system to DD.&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/3.0/tool-reference/data-management/calculate-geometry-attributes.htm" target="_blank" rel="noopener"&gt;https://pro.arcgis.com/en/pro-app/3.0/tool-reference/data-management/calculate-geometry-attributes.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can specify two new fields, specify the coordinate system, and the DD coordinate output format.&lt;/P&gt;&lt;P&gt;You will get your polygon feature class with the centroid fields added with the DD values.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Calc_geometry_attributes.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/83138i5B6C755459438227/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Calc_geometry_attributes.png" alt="Calc_geometry_attributes.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Calc_geometry_attributes_new_fields.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/83139iCB650D50058003F2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Calc_geometry_attributes_new_fields.png" alt="Calc_geometry_attributes_new_fields.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; In Python:&lt;/P&gt;&lt;P&gt;arcpy.management.CalculateGeometryAttributes(&lt;BR /&gt;in_features="Test",&lt;BR /&gt;geometry_property="X_coord CENTROID_X;Y_Coord CENTROID_Y",&lt;BR /&gt;length_unit="",&lt;BR /&gt;area_unit="",&lt;BR /&gt;coordinate_system='GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]',&lt;BR /&gt;coordinate_format="DD"&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 13:43:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/caluculate-centroid-in-wgs-dd-from-polygon-feature/m-p/1338200#M68959</guid>
      <dc:creator>BobBooth1</dc:creator>
      <dc:date>2023-10-16T13:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: Caluculate Centroid in WGS (DD) from Polygon Feature ((NAD_1983_UTM_Zone_15N)</title>
      <link>https://community.esri.com/t5/python-questions/caluculate-centroid-in-wgs-dd-from-polygon-feature/m-p/1338220#M68960</link>
      <description>&lt;P&gt;I have tried this tool and working as expected. I need to update centroids of a polygon in&amp;nbsp; latitude and longitude automatically whenever we create a new feature/ split/ merge features. it should behave like a trigger in SQL.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 14:07:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/caluculate-centroid-in-wgs-dd-from-polygon-feature/m-p/1338220#M68960</guid>
      <dc:creator>vijaybadugu</dc:creator>
      <dc:date>2023-10-16T14:07:27Z</dc:date>
    </item>
    <item>
      <title>Re: Caluculate Centroid in WGS (DD) from Polygon Feature ((NAD_1983_UTM_Zone_15N)</title>
      <link>https://community.esri.com/t5/python-questions/caluculate-centroid-in-wgs-dd-from-polygon-feature/m-p/1338230#M68961</link>
      <description>&lt;P&gt;You might dig into attribute rules. I'm not sure if you can set up such a rule.&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/calculation-attribute-rules.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/calculation-attribute-rules.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/arcade/profiles/attribute-rule-calculation/" target="_blank"&gt;https://developers.arcgis.com/arcade/profiles/attribute-rule-calculation/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 14:18:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/caluculate-centroid-in-wgs-dd-from-polygon-feature/m-p/1338230#M68961</guid>
      <dc:creator>BobBooth1</dc:creator>
      <dc:date>2023-10-16T14:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: Caluculate Centroid in WGS (DD) from Polygon Feature ((NAD_1983_UTM_Zone_15N)</title>
      <link>https://community.esri.com/t5/python-questions/caluculate-centroid-in-wgs-dd-from-polygon-feature/m-p/1338233#M68962</link>
      <description>&lt;P&gt;I tried that too and didn't find any arcade expression to do the same functionality and need a formulae to convert.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 14:21:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/caluculate-centroid-in-wgs-dd-from-polygon-feature/m-p/1338233#M68962</guid>
      <dc:creator>vijaybadugu</dc:creator>
      <dc:date>2023-10-16T14:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: Caluculate Centroid in WGS (DD) from Polygon Feature ((NAD_1983_UTM_Zone_15N)</title>
      <link>https://community.esri.com/t5/python-questions/caluculate-centroid-in-wgs-dd-from-polygon-feature/m-p/1338234#M68963</link>
      <description>&lt;P&gt;You could do this as an attribute rule I suspect - I've done that to calculate automatically calculate coordinate data when adding or updating records before. Another approach I use currently is the pyproj module in a script I run every month to convert lat/lon values to state plane coordinates but you can go the other way as well - this works for me since I am starting with non-spatial data at the outset and this saves me from having to create an intermediate spatial dataset.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 14:21:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/caluculate-centroid-in-wgs-dd-from-polygon-feature/m-p/1338234#M68963</guid>
      <dc:creator>clt_cabq</dc:creator>
      <dc:date>2023-10-16T14:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: Caluculate Centroid in WGS (DD) from Polygon Feature ((NAD_1983_UTM_Zone_15N)</title>
      <link>https://community.esri.com/t5/python-questions/caluculate-centroid-in-wgs-dd-from-polygon-feature/m-p/1338240#M68964</link>
      <description>&lt;P&gt;Can I run python script in SQL Server Trigger ? If yes , what is syntax of it&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to use the below tool get the Lat and Long and I don't have clue, how to run this in SQl Trigger&amp;nbsp;&lt;/P&gt;&lt;P&gt;arcpy.PointGeometry()&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 14:42:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/caluculate-centroid-in-wgs-dd-from-polygon-feature/m-p/1338240#M68964</guid>
      <dc:creator>vijaybadugu</dc:creator>
      <dc:date>2023-10-16T14:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: Caluculate Centroid in WGS (DD) from Polygon Feature ((NAD_1983_UTM_Zone_15N)</title>
      <link>https://community.esri.com/t5/python-questions/caluculate-centroid-in-wgs-dd-from-polygon-feature/m-p/1338571#M68969</link>
      <description>&lt;P&gt;y por que no haces una regla de atributo que te devuelva el centroide con&amp;nbsp;&lt;SPAN&gt;Centroid&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;$feature&lt;/SPAN&gt;&lt;SPAN&gt;) en arcade?&amp;nbsp;&lt;A href="https://developers.arcgis.com/arcade/function-reference/geometry_functions/" target="_blank"&gt;https://developers.arcgis.com/arcade/function-reference/geometry_functions/&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;entiendo que si deseas que cada polígono&amp;nbsp;te cada vez que se cree o divida con una regla de atributo no se diferencia mucho de un Trigger porque hace lo mismo y la puedes dejar en el campo o campos para crearla y luego si quieres cambiar de&amp;nbsp;&lt;/SPAN&gt;&lt;FONT&gt;Calcular el centroide en WGS (DD) a partir de la característica poligonal ((NAD_1983_UTM_Zone_15N) para esto hay varios e incluso lo último de arcade ya tenía una creada para ese cambio.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;este lo creamos para meterlo como texto pero el tuyo debe ser mucho más sencillo espero que te sirva de ayuda&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;Latitud:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;var originShift = 2.0 * PI * 6378137.0 / 2.0;&lt;/P&gt;&lt;P&gt;var lat = (Floor(Geometry($feature).Y,7) / 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;BR /&gt;var latitud = Floor(lat, 7)&lt;BR /&gt;if(latitud &amp;gt; 0){&lt;BR /&gt;return latitud + " N"&lt;BR /&gt;}else{&lt;BR /&gt;return latitud + " S"&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Longitud:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var originShift = 2.0 * PI * 6378137.0 / 2.0;&lt;/P&gt;&lt;P&gt;var lon = (Floor(Geometry($feature).X,7) / originShift) * 180.0;&lt;/P&gt;&lt;P&gt;var longitud = Floor(lon, 7)&lt;BR /&gt;if(longitud &amp;gt; 0){&lt;BR /&gt;return longitud + " E"&lt;BR /&gt;}else{&lt;BR /&gt;return longitud + " O"&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;solo debería añadirle además lo del centroide y tendría que&amp;nbsp; salir mediante reglas de atributos&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2023 12:42:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/caluculate-centroid-in-wgs-dd-from-polygon-feature/m-p/1338571#M68969</guid>
      <dc:creator>JuanManuelCruzHerrera</dc:creator>
      <dc:date>2023-10-17T12:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: Caluculate Centroid in WGS (DD) from Polygon Feature ((NAD_1983_UTM_Zone_15N)</title>
      <link>https://community.esri.com/t5/python-questions/caluculate-centroid-in-wgs-dd-from-polygon-feature/m-p/1338597#M68973</link>
      <description>&lt;P&gt;I tried, it returns always 0.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2023 13:58:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/caluculate-centroid-in-wgs-dd-from-polygon-feature/m-p/1338597#M68973</guid>
      <dc:creator>vijaybadugu</dc:creator>
      <dc:date>2023-10-17T13:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: Caluculate Centroid in WGS (DD) from Polygon Feature ((NAD_1983_UTM_Zone_15N)</title>
      <link>https://community.esri.com/t5/python-questions/caluculate-centroid-in-wgs-dd-from-polygon-feature/m-p/1338635#M68975</link>
      <description>&lt;P&gt;I tried same in Arcade playground,it was giving wrong results&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;originShift&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;2.0&lt;/SPAN&gt;&lt;SPAN&gt; * &lt;/SPAN&gt;&lt;SPAN&gt;PI&lt;/SPAN&gt;&lt;SPAN&gt; * &lt;/SPAN&gt;&lt;SPAN&gt;6378137.0&lt;/SPAN&gt;&lt;SPAN&gt; / &lt;/SPAN&gt;&lt;SPAN&gt;2.0&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;lon&lt;/SPAN&gt;&lt;SPAN&gt; = (&lt;/SPAN&gt;&lt;SPAN&gt;Floor&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;2050970.227158&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;7&lt;/SPAN&gt;&lt;SPAN&gt;) / &lt;/SPAN&gt;&lt;SPAN&gt;originShift&lt;/SPAN&gt;&lt;SPAN&gt;) * &lt;/SPAN&gt;&lt;SPAN&gt;180.0&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;longitud&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;Floor&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;lon&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;7&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;longitud&lt;/SPAN&gt;&lt;SPAN&gt; &amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;){&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;longitud&lt;/SPAN&gt;&lt;SPAN&gt; + &lt;/SPAN&gt;&lt;SPAN&gt;" E"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;else&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;longitud&lt;/SPAN&gt;&lt;SPAN&gt; + &lt;/SPAN&gt;&lt;SPAN&gt;" O"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;it should be&amp;nbsp;-91.695526 but the result is&amp;nbsp;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;"18.424179 E"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 17 Oct 2023 15:03:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/caluculate-centroid-in-wgs-dd-from-polygon-feature/m-p/1338635#M68975</guid>
      <dc:creator>vijaybadugu</dc:creator>
      <dc:date>2023-10-17T15:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: Caluculate Centroid in WGS (DD) from Polygon Feature ((NAD_1983_UTM_Zone_15N)</title>
      <link>https://community.esri.com/t5/python-questions/caluculate-centroid-in-wgs-dd-from-polygon-feature/m-p/1339062#M68982</link>
      <description>&lt;P&gt;Claro porque yo no te di uno exactamente para el tuyo sino que tenemos nosotros para para sacarlo con las coordenadas en texto tú necesitas uno que haga el resultado en números y que no diga ni N ni W ni e ni S el tuyo debe ser más sencillo si tengo un rato y puedo te busco uno que te pueda ayudar y te lo comparto pero de todas formas debes añadir además&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Centroid&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;$feature&lt;/SPAN&gt;&lt;SPAN&gt;) para que te devuelva el punto del polígono&lt;/SPAN&gt;&lt;SPAN&gt; o por lo menos las coordenadas del centroide y así poder tener una capa de puntos.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var centroid = Centroid($feature);&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://developers.arcgis.com/arcade/function-reference/geometry_functions/#:~:text=Centroid" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/arcade/function-reference/geometry_functions/#:~:text=Centroid&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;y luego es cuando hay que colocar la X e Y en WGS84 en grados decimales&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;luego puedes mirar esto que lo resuelve como lo deseas tú&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://community.esri.com/t5/arcgis-online-questions/converting-geometry-feature-coordinates-in-a-pop/m-p/106146#M5061" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-online-questions/converting-geometry-feature-coordinates-in-a-pop/m-p/106146#M5061&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;que te dará :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;1 function MetersToLatLon(x, y) {&lt;/P&gt;&lt;P&gt;2 &amp;nbsp;// Converts XY point from Spherical Mercator EPSG:900913 to lat/lon in WGS84 Datum&lt;/P&gt;&lt;P&gt;3 &amp;nbsp;// Source: &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;4 &amp;nbsp;var originShift = 2.0 * PI * 6378137.0 / 2.0;&lt;/P&gt;&lt;P&gt;5 var lon = (x / originShift) * 180.0;&lt;/P&gt;&lt;P&gt;6 var lat = (y / originShift) * 180.0;&lt;/P&gt;&lt;P&gt;7 lat = 180.0 / PI * (2.0 * Atan( Exp( lat * PI / 180.0)) - PI / 2.0);&lt;/P&gt;&lt;P&gt;8 return [lat, lon];&lt;/P&gt;&lt;P&gt;9 }&lt;/P&gt;&lt;P&gt;10&lt;/P&gt;&lt;P&gt;11 // use functions to get the desired output&lt;/P&gt;&lt;P&gt;12 var latlon = MetersToLatLon(Geometry($feature).X, Geometry($feature).Y);&lt;/P&gt;&lt;P&gt;13 return Round(latlon[0],6) + TextFormatting.NewLine + Round(latlon[1], 6);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;recuerda en EPSG: cambiarlo por 26915 que es el tuyo&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://epsg.io/26915" target="_blank" rel="noopener"&gt;https://epsg.io/26915&lt;/A&gt;&lt;/P&gt;&lt;P&gt;espero que esto te sirva saludos&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2023 12:26:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/caluculate-centroid-in-wgs-dd-from-polygon-feature/m-p/1339062#M68982</guid>
      <dc:creator>JuanManuelCruzHerrera</dc:creator>
      <dc:date>2023-10-18T12:26:43Z</dc:date>
    </item>
  </channel>
</rss>

