Auto-Calculate First and last Z-Value for Polyline [Arcade]

504
2
Jump to solution
07-06-2023 06:18 AM
Labels (1)
HarrisonCotter
New Contributor

Project:

  • I am creating a field app to collect precise locations of various infrastructures (pipes, manholes, hydrants, etc.), using the Trimble DA2 external GNSS receiver. The map tied to the field app has roughly 50 individual layers and 40 of those layers are editable by the end-user. Each layer has z-values and m-values turned on, and GPS Metadata Fields have been added as well. 

Overall Objective:

  • The ability to auto-populate empty fields with vital geometry data, such as elevation, through the use of 'Calculated Expressions' in  Field App Builder. (And convert units to 'feet', where necessary)

Success:

  • I am successfully retrieving the elevation data I need for the point feature classes using the following arcade expression:
    • if(IsEmpty(Geometry($feature)))
            {return;}
      else{Round(Geometry($feature).z*3.2808,3)}
  • I am also successful in retrieving the 3-dimensional length value from my polyline features:
    • if(IsEmpty(Geometry($feature)))
            {return;}
      else{Round(Length3D($feature, 'feet'),3)}

Current Issue:

  • I am trying to populate two more fields on my polyline feature classes, the z-value for the first vertices and the last vertices of every polyline:
    • Line start z-coordinate
    • Line end z-coordinate

 

Thank you very much for your time, in advance. - HC

0 Kudos
1 Solution

Accepted Solutions
HarrisonCotter
New Contributor
0 Kudos
2 Replies