<?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: Arcade: Get endpoint coordinates of multi-part polyline in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-get-endpoint-coordinates-of-multi-part/m-p/1155581#M53036</link>
    <description>&lt;P&gt;I'll just copy my answer from your idea:&lt;/P&gt;&lt;P&gt;In case you don't know: You can use negative numbers to index arrays from the end. While&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;array[0]&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;returns the first element,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;array[-1]&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;returns the last element,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;array[-2]&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;returns the second to last element and so on.&lt;/P&gt;&lt;P&gt;So you can get the last point of a polyline by jumping to the last point of the last line segment:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Geometry($feature).paths[-1][-1]&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 21 Mar 2022 06:31:45 GMT</pubDate>
    <dc:creator>JohannesLindner</dc:creator>
    <dc:date>2022-03-21T06:31:45Z</dc:date>
    <item>
      <title>Arcade: Get endpoint coordinates of multi-part polyline</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-get-endpoint-coordinates-of-multi-part/m-p/1155435#M53013</link>
      <description>&lt;P&gt;Arcade:&lt;/P&gt;&lt;P&gt;What’s the most succinct way to get the endpoint coordinates of multi-part polyline?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Related: &lt;A href="https://community.esri.com/t5/arcgis-pro-ideas/arcade-endpoint-function/idi-p/1155499" target="_self"&gt;Idea:&amp;nbsp;Arcade Endpoint() function&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 20:57:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-get-endpoint-coordinates-of-multi-part/m-p/1155435#M53013</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2022-04-06T20:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade: Get endpoint coordinates of multi-part polyline</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-get-endpoint-coordinates-of-multi-part/m-p/1155449#M53015</link>
      <description>&lt;P&gt;I liked this question because I've been looking for a reason to mess the multi-part polyline paths object for a while....&lt;/P&gt;&lt;P&gt;Three lines of code is easier to read, but you can do it in 1 (very bottom... in keeping with the "most succinct" theme)&lt;/P&gt;&lt;P&gt;var pathcount = Count(Geometry($feature).paths)-1&lt;BR /&gt;var linepath = Geometry($feature).paths[pathcount]&lt;BR /&gt;return Back(linepath).x +","+ Back(linepath).y&lt;/P&gt;&lt;P&gt;In the image below the selected polyline is multipart.&amp;nbsp; The blue labels are just the vertices of the lines labeled with their coordinates. The black labels are the results of the code to label the last vertex of each line.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KimGarbade_0-1647694736433.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/36773i0715C2E125697DDA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KimGarbade_0-1647694736433.png" alt="KimGarbade_0-1647694736433.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;One line:&lt;/P&gt;&lt;P&gt;return Back(Geometry($feature).paths[Count(Geometry($feature).paths)-1]).x +","+ Back(Geometry($feature).paths[Count(Geometry($feature).paths)-1]).y&lt;/P&gt;</description>
      <pubDate>Sat, 19 Mar 2022 13:03:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-get-endpoint-coordinates-of-multi-part/m-p/1155449#M53015</guid>
      <dc:creator>KimberlyGarbade</dc:creator>
      <dc:date>2022-03-19T13:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade: Get endpoint coordinates of multi-part polyline</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-get-endpoint-coordinates-of-multi-part/m-p/1155581#M53036</link>
      <description>&lt;P&gt;I'll just copy my answer from your idea:&lt;/P&gt;&lt;P&gt;In case you don't know: You can use negative numbers to index arrays from the end. While&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;array[0]&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;returns the first element,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;array[-1]&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;returns the last element,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;array[-2]&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;returns the second to last element and so on.&lt;/P&gt;&lt;P&gt;So you can get the last point of a polyline by jumping to the last point of the last line segment:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Geometry($feature).paths[-1][-1]&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 21 Mar 2022 06:31:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-get-endpoint-coordinates-of-multi-part/m-p/1155581#M53036</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-03-21T06:31:45Z</dc:date>
    </item>
  </channel>
</rss>

