<?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 Is there a way to convert spatial reference of label in Arcade Expressions? in ArcGIS Online Developers Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-developers-questions/is-there-a-way-to-convert-spatial-reference-of/m-p/504456#M588</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Howdy!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So long story short, I'm looking to pass X &amp;amp; Y information in a URL pop-up for a polygon layer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been able to configure Arcade Expressions to return the centroid of a polygon layer using the below snippet:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var poly = Geometry($feature);&lt;/P&gt;&lt;P&gt;var result = "";&lt;BR /&gt;if (!IsEmpty(poly)) {&lt;BR /&gt; var pnt_centr = Centroid(poly);&lt;BR /&gt; Console(pnt_centr);&lt;BR /&gt; result = Round(pnt_centr.X, 0);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;return result&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, my service is NC State Plane Nad 83 (&lt;A class="link-titled" href="http://spatialreference.org/ref/epsg/2264/" title="http://spatialreference.org/ref/epsg/2264/"&gt;NAD83 / North Carolina (ftUS): EPSG Projection -- Spatial Reference&lt;/A&gt;) and the output of the parsed centroid is in WGS 84 Auxiliary Sphere.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There aren't any explicit references to the whole of geometry expression being limited to WGS 84, so I&amp;nbsp;&lt;EM&gt;imagine&lt;/EM&gt; it is possible to work with other projections, but not sure how I'd go about it. Any and all help would be welcome!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Mar 2018 14:31:07 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2018-03-21T14:31:07Z</dc:date>
    <item>
      <title>Is there a way to convert spatial reference of label in Arcade Expressions?</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/is-there-a-way-to-convert-spatial-reference-of/m-p/504456#M588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Howdy!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So long story short, I'm looking to pass X &amp;amp; Y information in a URL pop-up for a polygon layer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been able to configure Arcade Expressions to return the centroid of a polygon layer using the below snippet:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var poly = Geometry($feature);&lt;/P&gt;&lt;P&gt;var result = "";&lt;BR /&gt;if (!IsEmpty(poly)) {&lt;BR /&gt; var pnt_centr = Centroid(poly);&lt;BR /&gt; Console(pnt_centr);&lt;BR /&gt; result = Round(pnt_centr.X, 0);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;return result&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, my service is NC State Plane Nad 83 (&lt;A class="link-titled" href="http://spatialreference.org/ref/epsg/2264/" title="http://spatialreference.org/ref/epsg/2264/"&gt;NAD83 / North Carolina (ftUS): EPSG Projection -- Spatial Reference&lt;/A&gt;) and the output of the parsed centroid is in WGS 84 Auxiliary Sphere.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There aren't any explicit references to the whole of geometry expression being limited to WGS 84, so I&amp;nbsp;&lt;EM&gt;imagine&lt;/EM&gt; it is possible to work with other projections, but not sure how I'd go about it. Any and all help would be welcome!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2018 14:31:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/is-there-a-way-to-convert-spatial-reference-of/m-p/504456#M588</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-03-21T14:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to convert spatial reference of label in Arcade Expressions?</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/is-there-a-way-to-convert-spatial-reference-of/m-p/1385197#M1341</link>
      <description>&lt;P&gt;I'm looking to do something similar. Did you ever figure it out?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2024 23:49:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/is-there-a-way-to-convert-spatial-reference-of/m-p/1385197#M1341</guid>
      <dc:creator>AlcoGISUser</dc:creator>
      <dc:date>2024-02-21T23:49:46Z</dc:date>
    </item>
  </channel>
</rss>

