<?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 Calculate Z Value Using Arcade in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/calculate-z-value-using-arcade/m-p/1001879#M34318</link>
    <description>&lt;P&gt;I'm working on a project to help our Stormwater division collect data for culverts and rain swails using a high-accuracy GPS.&amp;nbsp; The data will be 3D polylines.&amp;nbsp; They need to indicate the direction of flow, from the high end to the low end of the pipe.&amp;nbsp; I'm still trying to figure out how I can visually represent that, but for now I'm starting with the attribute data.&lt;/P&gt;&lt;P data-unlink="true"&gt;I need to calculate the difference in elevation from the start point to the end point of the line.&amp;nbsp; I found a tool called &lt;A href="https://pro.arcgis.com/en/pro-app/tool-reference/data-management/calculate-geometry-attributes.htm" target="_self"&gt;Calculate Geometry Attributes&lt;/A&gt; that can calculate these values, which works great, but I'd like to automate the process using an Attribute Rule in the database.&lt;/P&gt;&lt;P data-unlink="true"&gt;Does anyone know how to calculate the Z value of a point using ArcGIS Arcade?&lt;/P&gt;</description>
    <pubDate>Mon, 16 Nov 2020 20:13:52 GMT</pubDate>
    <dc:creator>JoshSaad1</dc:creator>
    <dc:date>2020-11-16T20:13:52Z</dc:date>
    <item>
      <title>Calculate Z Value Using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/calculate-z-value-using-arcade/m-p/1001879#M34318</link>
      <description>&lt;P&gt;I'm working on a project to help our Stormwater division collect data for culverts and rain swails using a high-accuracy GPS.&amp;nbsp; The data will be 3D polylines.&amp;nbsp; They need to indicate the direction of flow, from the high end to the low end of the pipe.&amp;nbsp; I'm still trying to figure out how I can visually represent that, but for now I'm starting with the attribute data.&lt;/P&gt;&lt;P data-unlink="true"&gt;I need to calculate the difference in elevation from the start point to the end point of the line.&amp;nbsp; I found a tool called &lt;A href="https://pro.arcgis.com/en/pro-app/tool-reference/data-management/calculate-geometry-attributes.htm" target="_self"&gt;Calculate Geometry Attributes&lt;/A&gt; that can calculate these values, which works great, but I'd like to automate the process using an Attribute Rule in the database.&lt;/P&gt;&lt;P data-unlink="true"&gt;Does anyone know how to calculate the Z value of a point using ArcGIS Arcade?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 20:13:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/calculate-z-value-using-arcade/m-p/1001879#M34318</guid>
      <dc:creator>JoshSaad1</dc:creator>
      <dc:date>2020-11-16T20:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Z Value Using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/calculate-z-value-using-arcade/m-p/1001914#M34321</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You could try starting with the logic here:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-online-questions/calculate-coordinates-of-polyline-in-arcgis-online-with-arcade/td-p/351115" target="_blank"&gt;https://community.esri.com/t5/arcgis-online-questions/calculate-coordinates-of-polyline-in-arcgis-online-with-arcade/td-p/351115&lt;/A&gt;&amp;nbsp;but accessing first_point.z and last_point.z&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Marc&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 21:31:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/calculate-z-value-using-arcade/m-p/1001914#M34321</guid>
      <dc:creator>Marc_Graham</dc:creator>
      <dc:date>2020-11-16T21:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Z Value Using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/calculate-z-value-using-arcade/m-p/1001928#M34324</link>
      <description>&lt;P&gt;Thanks, I tried that but got a null value returned.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 21:55:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/calculate-z-value-using-arcade/m-p/1001928#M34324</guid>
      <dc:creator>JoshSaad1</dc:creator>
      <dc:date>2020-11-16T21:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Z Value Using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/calculate-z-value-using-arcade/m-p/1001935#M34326</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;You might want to check your data then.&amp;nbsp; I just created a demo dataset in a fgdb and it worked for me. Bearing in mind this is a very simple dataset with single part polylines.&lt;/P&gt;&lt;P&gt;start point:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var line = Geometry($feature);
var path = line.paths[0];
var pt = path[0];
return pt.z&lt;/LI-CODE&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;end point:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var line = Geometry($feature);
var path = line.paths[0];
var pt = path[-1];
return pt.z&lt;/LI-CODE&gt;&lt;P&gt;I created three lines and calculated their geometries in fields using the gp tool, then the same using arcade.&amp;nbsp; I then added globalids and attribute rules for two new fields.&amp;nbsp; Finally I digitised two new lines connecting the start and ends of the previously created ones.&amp;nbsp; You can see the attributes were updated successfully and they match the pre-existing lines. I wanted to insert an image but apparently I don't have permission now.&lt;/P&gt;&lt;TABLE width="754"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="68"&gt;Shape *&lt;/TD&gt;&lt;TD width="95"&gt;Shape_Length&lt;/TD&gt;&lt;TD width="42"&gt;name&lt;/TD&gt;&lt;TD width="102"&gt;start_elev&lt;/TD&gt;&lt;TD width="98"&gt;end_elev&lt;/TD&gt;&lt;TD width="77"&gt;arc_st_elev&lt;/TD&gt;&lt;TD width="90"&gt;arc_end_elev&lt;/TD&gt;&lt;TD width="84"&gt;rule_st_elev&lt;/TD&gt;&lt;TD width="98"&gt;rule_end_elev&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Polyline Z&lt;/TD&gt;&lt;TD&gt;477.593909&lt;/TD&gt;&lt;TD&gt;a&lt;/TD&gt;&lt;TD&gt;128.1235&lt;/TD&gt;&lt;TD&gt;61.531&lt;/TD&gt;&lt;TD&gt;128.1235&lt;/TD&gt;&lt;TD&gt;61.531&lt;/TD&gt;&lt;TD&gt;&amp;lt;Null&amp;gt;&lt;/TD&gt;&lt;TD&gt;&amp;lt;Null&amp;gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Polyline Z&lt;/TD&gt;&lt;TD&gt;477.22298&lt;/TD&gt;&lt;TD&gt;b&lt;/TD&gt;&lt;TD&gt;117.708&lt;/TD&gt;&lt;TD&gt;76.076&lt;/TD&gt;&lt;TD&gt;117.708&lt;/TD&gt;&lt;TD&gt;76.076&lt;/TD&gt;&lt;TD&gt;&amp;lt;Null&amp;gt;&lt;/TD&gt;&lt;TD&gt;&amp;lt;Null&amp;gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Polyline Z&lt;/TD&gt;&lt;TD&gt;388.065934&lt;/TD&gt;&lt;TD&gt;c&lt;/TD&gt;&lt;TD&gt;127.2341&lt;/TD&gt;&lt;TD&gt;66.5974&lt;/TD&gt;&lt;TD&gt;127.2341&lt;/TD&gt;&lt;TD&gt;66.5974&lt;/TD&gt;&lt;TD&gt;&amp;lt;Null&amp;gt;&lt;/TD&gt;&lt;TD&gt;&amp;lt;Null&amp;gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Polyline Z&lt;/TD&gt;&lt;TD&gt;435.647143&lt;/TD&gt;&lt;TD&gt;a-c&lt;/TD&gt;&lt;TD&gt;&amp;lt;Null&amp;gt;&lt;/TD&gt;&lt;TD&gt;&amp;lt;Null&amp;gt;&lt;/TD&gt;&lt;TD&gt;&amp;lt;Null&amp;gt;&lt;/TD&gt;&lt;TD&gt;&amp;lt;Null&amp;gt;&lt;/TD&gt;&lt;TD&gt;128.1235&lt;/TD&gt;&lt;TD&gt;66.5974&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Polyline Z&lt;/TD&gt;&lt;TD&gt;416.362791&lt;/TD&gt;&lt;TD&gt;c-b&lt;/TD&gt;&lt;TD&gt;&amp;lt;Null&amp;gt;&lt;/TD&gt;&lt;TD&gt;&amp;lt;Null&amp;gt;&lt;/TD&gt;&lt;TD&gt;&amp;lt;Null&amp;gt;&lt;/TD&gt;&lt;TD&gt;&amp;lt;Null&amp;gt;&lt;/TD&gt;&lt;TD&gt;127.2341&lt;/TD&gt;&lt;TD&gt;76.076&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Mon, 16 Nov 2020 22:31:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/calculate-z-value-using-arcade/m-p/1001935#M34326</guid>
      <dc:creator>Marc_Graham</dc:creator>
      <dc:date>2020-11-16T22:31:59Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Z Value Using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/calculate-z-value-using-arcade/m-p/1002018#M34329</link>
      <description>&lt;P&gt;Thanks, I was testing in an AGOL web map.&amp;nbsp; When I tested in Pro it worked just fine.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 03:10:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/calculate-z-value-using-arcade/m-p/1002018#M34329</guid>
      <dc:creator>JoshSaad3</dc:creator>
      <dc:date>2020-11-17T03:10:42Z</dc:date>
    </item>
  </channel>
</rss>

