<?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>idea Improve Arcade polyline paths array documentation in Developers Ideas</title>
    <link>https://community.esri.com/t5/developers-ideas/improve-arcade-polyline-paths-array-documentation/idi-p/1151939</link>
    <description>&lt;P&gt;Regarding the Arcade developer documentation:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I find the description of the&amp;nbsp;&lt;A href="https://developers.arcgis.com/arcade/guide/types/#polyline" target="_self"&gt;Polyline paths array&lt;/A&gt;&amp;nbsp;to be confusing:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;"A three-dimensional array of numbers. The inner-most array contains the x,y,z,m coordinates of a single point. The second dimension contains additional points making up a line segment. The third dimension allows the polyline to have multiple segments."&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Could that blurb be re-worded so that it's more intuitive?&lt;/P&gt;&lt;P&gt;Something like this?&lt;BR /&gt;&lt;SPAN&gt;- An outer array to hold the multi-parts:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/FONT&gt;&lt;SPAN&gt;multiple parts here&lt;/SPAN&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;]&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;- A middle array of one or more multi-parts:&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;[&lt;/FONT&gt;&lt;/STRONG&gt;&lt;SPAN&gt;multiple parts:&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;FONT color="#FF6600"&gt;[&lt;/FONT&gt;&lt;/STRONG&gt;&lt;SPAN&gt;p0&lt;/SPAN&gt;&lt;FONT color="#FF6600"&gt;&lt;STRONG&gt;], [&lt;/STRONG&gt;&lt;/FONT&gt;&lt;SPAN&gt;p1&lt;/SPAN&gt;&lt;STRONG&gt;&lt;FONT color="#FF6600"&gt;]&amp;nbsp;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;SPAN&gt;- An inner array that is the sets of vertices:&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;[&lt;/FONT&gt;&lt;/STRONG&gt;&lt;SPAN&gt;multiple parts:&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;FONT color="#FF6600"&gt;[&lt;/FONT&gt;&lt;/STRONG&gt;&lt;SPAN&gt;p0:&amp;nbsp;&amp;nbsp;[X,Y],&amp;nbsp;[X,Y],&amp;nbsp;[X,Y]&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;FONT color="#FF6600"&gt;], [&lt;/FONT&gt;&lt;/STRONG&gt;&lt;SPAN&gt;p:1&amp;nbsp;&amp;nbsp;[X,Y],&amp;nbsp;[X,Y]&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#FF6600"&gt;&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;]&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000000"&gt;I think a more intuitive explanation would be helpful. I've heard from a few different people that said they also found the existing wording confusing.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Related info here:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-pro-questions/arcade-what-does-quot-zero-dimensional-geometry/m-p/1151925/highlight/true#M52550" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-pro-questions/arcade-what-does-quot-zero-dimensional-geometry/m-p/1151925/highlight/true#M52550&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 09 Mar 2022 15:10:15 GMT</pubDate>
    <dc:creator>Bud</dc:creator>
    <dc:date>2022-03-09T15:10:15Z</dc:date>
    <item>
      <title>Improve Arcade polyline paths array documentation</title>
      <link>https://community.esri.com/t5/developers-ideas/improve-arcade-polyline-paths-array-documentation/idi-p/1151939</link>
      <description>&lt;P&gt;Regarding the Arcade developer documentation:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I find the description of the&amp;nbsp;&lt;A href="https://developers.arcgis.com/arcade/guide/types/#polyline" target="_self"&gt;Polyline paths array&lt;/A&gt;&amp;nbsp;to be confusing:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;"A three-dimensional array of numbers. The inner-most array contains the x,y,z,m coordinates of a single point. The second dimension contains additional points making up a line segment. The third dimension allows the polyline to have multiple segments."&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Could that blurb be re-worded so that it's more intuitive?&lt;/P&gt;&lt;P&gt;Something like this?&lt;BR /&gt;&lt;SPAN&gt;- An outer array to hold the multi-parts:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/FONT&gt;&lt;SPAN&gt;multiple parts here&lt;/SPAN&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;]&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;- A middle array of one or more multi-parts:&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;[&lt;/FONT&gt;&lt;/STRONG&gt;&lt;SPAN&gt;multiple parts:&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;FONT color="#FF6600"&gt;[&lt;/FONT&gt;&lt;/STRONG&gt;&lt;SPAN&gt;p0&lt;/SPAN&gt;&lt;FONT color="#FF6600"&gt;&lt;STRONG&gt;], [&lt;/STRONG&gt;&lt;/FONT&gt;&lt;SPAN&gt;p1&lt;/SPAN&gt;&lt;STRONG&gt;&lt;FONT color="#FF6600"&gt;]&amp;nbsp;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;SPAN&gt;- An inner array that is the sets of vertices:&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;[&lt;/FONT&gt;&lt;/STRONG&gt;&lt;SPAN&gt;multiple parts:&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;FONT color="#FF6600"&gt;[&lt;/FONT&gt;&lt;/STRONG&gt;&lt;SPAN&gt;p0:&amp;nbsp;&amp;nbsp;[X,Y],&amp;nbsp;[X,Y],&amp;nbsp;[X,Y]&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;FONT color="#FF6600"&gt;], [&lt;/FONT&gt;&lt;/STRONG&gt;&lt;SPAN&gt;p:1&amp;nbsp;&amp;nbsp;[X,Y],&amp;nbsp;[X,Y]&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#FF6600"&gt;&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;]&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000000"&gt;I think a more intuitive explanation would be helpful. I've heard from a few different people that said they also found the existing wording confusing.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Related info here:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-pro-questions/arcade-what-does-quot-zero-dimensional-geometry/m-p/1151925/highlight/true#M52550" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-pro-questions/arcade-what-does-quot-zero-dimensional-geometry/m-p/1151925/highlight/true#M52550&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2022 15:10:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-ideas/improve-arcade-polyline-paths-array-documentation/idi-p/1151939</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2022-03-09T15:10:15Z</dc:date>
    </item>
    <item>
      <title>Re: Improve Arcade polyline paths array documentation</title>
      <link>https://community.esri.com/t5/developers-ideas/improve-arcade-polyline-paths-array-documentation/idc-p/1152058#M1113</link>
      <description>&lt;P&gt;I think the explanation is quite intuitive and tells you everything you need to know in a very concise way.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A three-dimensional array of numbers&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;We're storing numeric information. The numbers are stored in a hirarchical structure. We have to go 3 levels deep to get the numbers&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;The inner-most array contains the x,y,z,m coordinates of a single point&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So that's what the numbers represent, cool. It makes sense to put that information first, instead of going though the structure top-down. This translates to &lt;STRONG&gt;p = [x, y, z, m]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The second dimension contains additional points making up a line segment&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;We already know the second dimension contains multiple instances of the first dimension (that'&lt;BR /&gt;s what "dimension" means in the context of arrays: Higher dimensions hold multiple instances of lower dimensions). The new information is that these form a segment. This means &lt;STRONG&gt;segment = [p0, p1, p2]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The third dimension allows the polyline to have multiple segments&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Alright, that's why we need the third dimension. This means &lt;STRONG&gt;paths = [segment0, segment1]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;So, from just 4 sentences, I know what the data represents, how it is structured, and how I can get to the information I need. The documentation is intuitive enough.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The real problem is that it is somewhat wrong:&lt;/P&gt;&lt;P&gt;It is correct for &lt;STRONG&gt;creating&lt;/STRONG&gt; a Polyline (or Polygon). But if you want to &lt;STRONG&gt;read&amp;nbsp;&lt;/STRONG&gt;the paths/rings property of an existing geometry, it is not number[][][] (3D number array), but &lt;STRONG&gt;Point[][]&lt;/STRONG&gt; (2D Point array).&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var p0 = [1, 1, 0, 0]  // [x, y, z, m]
var p1 = [2, 2, 0, sqrt(2)]
var segment0 = [p0, p1]
var paths = [segment0]
Console("paths used to create the geometry:")
Console(paths + "\n")

var geo = Polyline({"paths": paths, "spatialReference": {"wkid": 25832}})
Console("paths read from the geometry:")
Console(geo.paths + "\n")

// I want to get the x coordinate of the start point.
//Console(geo.paths[0][0][0])  // this will fail, because geo.paths is not number[][][], but Point[][]
Console(geo.paths[0][0].x)
Console(geo.paths[0][0].type)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;paths used to create the geometry:
[[[1,1,0,0],[2,2,0,1.414213562373095]]]

paths read from the geometry:
[[{"x":1,"y":1,"z":0,"m":0,"spatialReference":{"wkid":25832}},{"x":2,"y":2,"z":0,"m":1.414213562373095,"spatialReference":{"wkid":25832}}]]

1
Point&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2022 09:28:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-ideas/improve-arcade-polyline-paths-array-documentation/idc-p/1152058#M1113</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-03-09T09:28:35Z</dc:date>
    </item>
  </channel>
</rss>

