<?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 How to get the mid point (X,Y) of a polyline segment in Arcade ?  in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/how-to-get-the-mid-point-x-y-of-a-polyline-segment/m-p/393152#M19666</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can someone please help me find out how to get the &lt;STRONG&gt;midpoint (x.y)&lt;/STRONG&gt; of a line segment in Arcade (ArcGIS Online) ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a road layer with many segmented lines, I want to create a pop up link using the mid point x,y info.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much !!&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Sep 2020 12:21:47 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2020-09-09T12:21:47Z</dc:date>
    <item>
      <title>How to get the mid point (X,Y) of a polyline segment in Arcade ?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-to-get-the-mid-point-x-y-of-a-polyline-segment/m-p/393152#M19666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can someone please help me find out how to get the &lt;STRONG&gt;midpoint (x.y)&lt;/STRONG&gt; of a line segment in Arcade (ArcGIS Online) ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a road layer with many segmented lines, I want to create a pop up link using the mid point x,y info.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much !!&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Sep 2020 12:21:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-to-get-the-mid-point-x-y-of-a-polyline-segment/m-p/393152#M19666</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-09-09T12:21:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the mid point (X,Y) of a polyline segment in Arcade ?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-to-get-the-mid-point-x-y-of-a-polyline-segment/m-p/393153#M19667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.esri.com/people/KhattabK" target="_blank"&gt;KhattabK&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not entirely sure if this works, but could you try it?&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;Function &lt;SPAN class="token function"&gt;dist&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;x1&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; y1&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; x2&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; y2&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Sqrt&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Pow&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;x2&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;x1&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Pow&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;y2&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;y1&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;// get the geometry&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; segment &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Geometry&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$feature&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"paths"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;// determine length halfway&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; halflen &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Length&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$feature&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;// initialize vars&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; xcrd &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; Null&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; ycrd &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; Null&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; cumlen &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;// loop through coordinate pairs in segment&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; i &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; segment&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;i &lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
        &lt;SPAN class="comment token"&gt;// second coordinate pair, start calculating distance&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; xprev &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; segment&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;i&lt;SPAN class="number token"&gt;-1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"x"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; yprev &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; segment&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;i&lt;SPAN class="number token"&gt;-1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"y"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; xcurr &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; segment&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;i&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"x"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; ycurr &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; segment&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;i&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"y"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; len &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;dist&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;xprev&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; yprev&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; xcurr&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; ycurr&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; prevcum &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; cumlen&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        cumlen &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; len&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="comment token"&gt;// if past halfway on line&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;cumlen &lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; halflen&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
            &lt;SPAN class="comment token"&gt;// calculate midpoint&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; restlen &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; halflen &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt; prevcum&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; frac &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; restlen &lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt; len&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; xmid &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;xcurr &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt; xprev&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; frac &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; xprev&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; ymid &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ycurr &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt; yprev&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; frac &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; yprev&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"("&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Round&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;xmid&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;", "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Round&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ymid&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;")"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
        &lt;SPAN class="comment token"&gt;// first coordinate pair&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; xcrd &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; segment&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;i&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"x"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; ycrd &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; segment&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;i&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"y"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Error"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:01:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-to-get-the-mid-point-x-y-of-a-polyline-segment/m-p/393153#M19667</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-12-11T18:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the mid point (X,Y) of a polyline segment in Arcade ?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-to-get-the-mid-point-x-y-of-a-polyline-segment/m-p/393154#M19668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/3100"&gt;Xander Bakker&lt;/A&gt; !&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much for getting back to me so quickly ! I really appreciate your help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This worked like a champ ! I had to add the &lt;STRONG&gt;Meters to Lat Long Function&lt;/STRONG&gt; &amp;amp; concatenation to get what I wanted. I will share the source link here for the benefit.&amp;nbsp;&lt;A href="https://community.esri.com/thread/222695"&gt;Lat/Long unit conversion with Arcade&lt;/A&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was wondering if you know if this is possible in Arcade :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The ability to grab the x,y of the user's mouse click and put it in Arcade for String Concatenation.&amp;nbsp; &amp;nbsp;&lt;/STRONG&gt;(please see snip below)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much&amp;nbsp; &lt;A href="https://community.esri.com/migrated-users/3100"&gt;Xander Bakker&lt;/A&gt;!!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/506848_pastedImage_4.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2020 15:52:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-to-get-the-mid-point-x-y-of-a-polyline-segment/m-p/393154#M19668</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-09-14T15:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the mid point (X,Y) of a polyline segment in Arcade ?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-to-get-the-mid-point-x-y-of-a-polyline-segment/m-p/393155#M19669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.esri.com/people/KhattabK"&gt;KhattabK&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, it is not possible to access the exact location where the user clicked. It would be great to be able to do this. Currently for a pop-up you will have access (initially) to the feature geometry where the user clicked, but not the exact location. No problem for point data, but it will be for polylines and polygons.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2020 19:26:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-to-get-the-mid-point-x-y-of-a-polyline-segment/m-p/393155#M19669</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2020-09-14T19:26:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the mid point (X,Y) of a polyline segment in Arcade ?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-to-get-the-mid-point-x-y-of-a-polyline-segment/m-p/393156#M19670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much for the clarification!!&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2020 19:32:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-to-get-the-mid-point-x-y-of-a-polyline-segment/m-p/393156#M19670</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-09-14T19:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the mid point (X,Y) of a polyline segment in Arcade ?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-to-get-the-mid-point-x-y-of-a-polyline-segment/m-p/1148840#M44638</link>
      <description>&lt;P&gt;If for some reason that midpoint expression doesn't work, this might be an option:&lt;/P&gt;&lt;P&gt;&lt;U&gt;Buffer the line and get the centroid of the resulting polygon.&lt;/U&gt;&amp;nbsp;It's kind of like a "poor man's midpoint".&lt;/P&gt;&lt;P&gt;If I recall, that works ok. But I think I remember the point&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;U&gt;&lt;EM&gt;not&lt;/EM&gt;&lt;/U&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;being the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;U&gt;&lt;EM&gt;exact&lt;/EM&gt;&lt;/U&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;midpoint of the line. I forget what the specific issue was. It's probably good enough for most use cases though...&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 22:17:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-to-get-the-mid-point-x-y-of-a-polyline-segment/m-p/1148840#M44638</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2022-02-28T22:17:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the mid point (X,Y) of a polyline segment in Arcade ?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-to-get-the-mid-point-x-y-of-a-polyline-segment/m-p/1183402#M46473</link>
      <description>&lt;P&gt;Are you a wizard?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 03:40:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-to-get-the-mid-point-x-y-of-a-polyline-segment/m-p/1183402#M46473</guid>
      <dc:creator>DrewDowling</dc:creator>
      <dc:date>2022-06-16T03:40:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the mid point (X,Y) of a polyline segment in Arcade ?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-to-get-the-mid-point-x-y-of-a-polyline-segment/m-p/1183559#M46480</link>
      <description>&lt;P&gt;In Desktop in Toolbox you can use the Data Management &amp;gt; Features &amp;gt; Add Geometry Attributes.&lt;/P&gt;&lt;P&gt;Add the line you're wanting to determine the midpoint for as the Input Feature and check the box next to Line_Start_Mid_End.&amp;nbsp; This will add columns in the line's attribute table showing the coordinates for the Start X and Y, Mid X and Y, End X and Y in the same coordinate system as the line.&amp;nbsp; It doesn't actually create a point but you could then create a feature using these coordinates.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 14:46:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-to-get-the-mid-point-x-y-of-a-polyline-segment/m-p/1183559#M46480</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-06-16T14:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the mid point (X,Y) of a polyline segment in Arcade ?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-to-get-the-mid-point-x-y-of-a-polyline-segment/m-p/1183621#M46482</link>
      <description>&lt;P&gt;&lt;STRIKE&gt;That's an interesting idea.&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;If I understand correctly, I think you're saying we could:&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;...reference those "Geometry Attributes" &lt;EM&gt;(fields in the attribute table but not in the underlying db table)&lt;/EM&gt; right in Arcade. I think I've done the same sort of thing with the &amp;nbsp;&lt;FONT face="courier new,courier" color="#0000FF"&gt;$feature.shape_length&lt;/FONT&gt;:&amp;nbsp;&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-pro-ideas/hascurve-arcade-geometry-property/idc-p/1149449/highlight/true#M18873" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-pro-ideas/hascurve-arcade-geometry-property/idc-p/1149449/highlight/true#M18873&lt;/A&gt;&amp;nbsp;&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;Is that what you were thinking?&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;Never mind. Those "Geometry Attribute" fields aren't dynamic.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/2.8/tool-reference/data-management/add-geometry-attributes.htm" target="_self"&gt;Add Geometry Attributes (Data Management)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The values in these fields are not automatically recalculated after edits. If you edit the features, you'll need to run this tool again to update the field values.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 18:02:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-to-get-the-mid-point-x-y-of-a-polyline-segment/m-p/1183621#M46482</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2022-06-16T18:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the mid point (X,Y) of a polyline segment in Arcade ?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-to-get-the-mid-point-x-y-of-a-polyline-segment/m-p/1183734#M46490</link>
      <description>&lt;P&gt;I meant use that function to obtain the midpoint and then create a point (Editor &amp;gt; Create Feature with Absolute X, Y) in ArcMap.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 20:34:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-to-get-the-mid-point-x-y-of-a-polyline-segment/m-p/1183734#M46490</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-06-16T20:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the mid point (X,Y) of a polyline segment in Arcade ?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-to-get-the-mid-point-x-y-of-a-polyline-segment/m-p/1315538#M53754</link>
      <description>&lt;P&gt;As I am a novice with Arcade, I am loving this post.&amp;nbsp; Xander Bakker's post works great, but I am like you and need the Lat/Long.&amp;nbsp; You have the code link for that, but I am not sure how to add it to the original function.&amp;nbsp; Can you give me some advice as to where to insert it?&lt;/P&gt;&lt;P&gt;Thank You in advance!&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2023 14:32:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-to-get-the-mid-point-x-y-of-a-polyline-segment/m-p/1315538#M53754</guid>
      <dc:creator>BenjamanGarrett-FG</dc:creator>
      <dc:date>2023-08-04T14:32:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the mid point (X,Y) of a polyline segment in Arcade ?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-to-get-the-mid-point-x-y-of-a-polyline-segment/m-p/1349375#M55883</link>
      <description>&lt;P&gt;I want to add to the discussion (and possibly be corrected if I'm wrong). This gets the more precise midpoint of the feature, but doesn't always return a point on the line if the line is not straight. If you don't need a precise midpoint and you want the coordinates to be on the line, I've found the easier option is to get the number of a paths in the geometry object, and get coordinates from one of those paths closest to the middle. If there are 11 paths in the segment, get the 5 or 6th and use those coordinates. then it's always on the line, and the code is simpler.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 20:56:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-to-get-the-mid-point-x-y-of-a-polyline-segment/m-p/1349375#M55883</guid>
      <dc:creator>TanGnar</dc:creator>
      <dc:date>2023-11-14T20:56:02Z</dc:date>
    </item>
  </channel>
</rss>

